Top Description Fields Constructors Methods
org.conscrypt

pack-priv final Class ApplicationProtocolSelectorAdapter

extends Object
Class Inheritance
Static Imports
org.conscrypt.Preconditions.checkNotNull

An adapter to bridge between the native code and the ApplicationProtocolSelector API.

Field Summary

Modifier and TypeField and Description
private final SSLEngine
private static final int
private final ApplicationProtocolSelector
private final SSLSocket

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv int

Returns:

If successful, returns the offset into the lenghPrefixedList array of the selected protocol (i.e. points to the length prefix). Otherwise, returns NO_PROTOCOL_SELECTED.
selectApplicationProtocol
(byte[]
the peer protocols in length-delimited form.
encodedProtocols
)

Performs the ALPN protocol selection from the given list of length-delimited peer protocols.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

engineback to summary
private final SSLEngine engine
NO_PROTOCOL_SELECTEDback to summary
private static final int NO_PROTOCOL_SELECTED
selectorback to summary
private final ApplicationProtocolSelector selector
socketback to summary
private final SSLSocket socket

Constructor Detail

ApplicationProtocolSelectorAdapterback to summary
pack-priv ApplicationProtocolSelectorAdapter(SSLEngine engine, ApplicationProtocolSelector selector)
ApplicationProtocolSelectorAdapterback to summary
pack-priv ApplicationProtocolSelectorAdapter(SSLSocket socket, ApplicationProtocolSelector selector)

Method Detail

selectApplicationProtocolback to summary
pack-priv int selectApplicationProtocol(byte[] encodedProtocols)

Performs the ALPN protocol selection from the given list of length-delimited peer protocols.

Parameters
encodedProtocols:byte[]

the peer protocols in length-delimited form.

Returns:int

If successful, returns the offset into the lenghPrefixedList array of the selected protocol (i.e. points to the length prefix). Otherwise, returns NO_PROTOCOL_SELECTED.