Package io.undertow.protocols.alpn
Class JDK9AlpnProvider
- java.lang.Object
-
- io.undertow.protocols.alpn.JDK9AlpnProvider
-
- All Implemented Interfaces:
ALPNProvider
public class JDK9AlpnProvider extends Object implements ALPNProvider
Open listener adaptor for ALPN connections that use the JDK9 APINot a proper open listener as such, but more a mechanism for selecting between them
- Author:
- Stuart Douglas
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJDK9AlpnProvider.JDK9ALPNMethods
-
Field Summary
Fields Modifier and Type Field Description static JDK9AlpnProvider.JDK9ALPNMethodsJDK_9_ALPN_METHODS
-
Constructor Summary
Constructors Constructor Description JDK9AlpnProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetPriority()StringgetSelectedProtocol(SSLEngine engine)Gets the selected ALPN protocol, of null if none was selected.booleanisEnabled(SSLEngine sslEngine)SSLEnginesetProtocols(SSLEngine engine, String[] protocols)Sets the SSL protocols, and potentially wraps the SSLEngineStringtoString()
-
-
-
Field Detail
-
JDK_9_ALPN_METHODS
public static final JDK9AlpnProvider.JDK9ALPNMethods JDK_9_ALPN_METHODS
-
-
Method Detail
-
isEnabled
public boolean isEnabled(SSLEngine sslEngine)
- Specified by:
isEnabledin interfaceALPNProvider
-
setProtocols
public SSLEngine setProtocols(SSLEngine engine, String[] protocols)
Description copied from interface:ALPNProviderSets the SSL protocols, and potentially wraps the SSLEngine- Specified by:
setProtocolsin interfaceALPNProvider- Parameters:
engine- The original engineprotocols- The protocols- Returns:
- The new SSLEngine
-
getSelectedProtocol
public String getSelectedProtocol(SSLEngine engine)
Description copied from interface:ALPNProviderGets the selected ALPN protocol, of null if none was selected.- Specified by:
getSelectedProtocolin interfaceALPNProvider- Parameters:
engine- The SSL Engine- Returns:
- The selected protocol
-
getPriority
public int getPriority()
- Specified by:
getPriorityin interfaceALPNProvider- Returns:
- The priority of this provider, higher priority providers will be tried first
-
-