Package org.conscrypt
Class ApplicationProtocolSelectorAdapter
- java.lang.Object
-
- org.conscrypt.ApplicationProtocolSelectorAdapter
-
final class ApplicationProtocolSelectorAdapter extends java.lang.Object
An adapter to bridge between the native code and theApplicationProtocolSelector
API.
-
-
Field Summary
Fields Modifier and Type Field Description private javax.net.ssl.SSLEngine
engine
private static int
NO_PROTOCOL_SELECTED
private ApplicationProtocolSelector
selector
private javax.net.ssl.SSLSocket
socket
-
Constructor Summary
Constructors Constructor Description ApplicationProtocolSelectorAdapter(javax.net.ssl.SSLEngine engine, ApplicationProtocolSelector selector)
ApplicationProtocolSelectorAdapter(javax.net.ssl.SSLSocket socket, ApplicationProtocolSelector selector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) int
selectApplicationProtocol(byte[] encodedProtocols)
Performs the ALPN protocol selection from the given list of length-delimited peer protocols.
-
-
-
Field Detail
-
NO_PROTOCOL_SELECTED
private static final int NO_PROTOCOL_SELECTED
- See Also:
- Constant Field Values
-
engine
private final javax.net.ssl.SSLEngine engine
-
socket
private final javax.net.ssl.SSLSocket socket
-
selector
private final ApplicationProtocolSelector selector
-
-
Constructor Detail
-
ApplicationProtocolSelectorAdapter
ApplicationProtocolSelectorAdapter(javax.net.ssl.SSLEngine engine, ApplicationProtocolSelector selector)
-
ApplicationProtocolSelectorAdapter
ApplicationProtocolSelectorAdapter(javax.net.ssl.SSLSocket socket, ApplicationProtocolSelector selector)
-
-
Method Detail
-
selectApplicationProtocol
int selectApplicationProtocol(byte[] encodedProtocols)
Performs the ALPN protocol selection from the given list of length-delimited peer protocols.- Parameters:
encodedProtocols
- the peer protocols in length-delimited form.- Returns:
- If successful, returns the offset into the
lenghPrefixedList
array of the selected protocol (i.e. points to the length prefix). Otherwise, returnsNO_PROTOCOL_SELECTED
.
-
-