Top Description Inners Methods
io.netty5.handler.ssl

public Interface JdkApplicationProtocolNegotiator

extends ApplicationProtocolNegotiator
Known Direct Implementers
io.netty5.handler.ssl.JdkBaseApplicationProtocolNegotiator, io.netty5.handler.ssl.JdkDefaultApplicationProtocolNegotiator
Annotations
@Deprecated
Imports
io.netty5.buffer.BufferAllocator, .DefaultBufferAllocators, javax.net.ssl.SSLEngine, java.util.List, .Set

Deprecated

use ApplicationProtocolConfig

JDK extension methods to support ApplicationProtocolNegotiator

Nested and Inner Type Summary

Modifier and TypeClass and Description
public abstract static class
public static interface
JdkApplicationProtocolNegotiator.ProtocolSelectionListener

A listener to be notified by which protocol was select by its peer.

public static interface
public static interface
JdkApplicationProtocolNegotiator.ProtocolSelector

Interface to define the role of an application protocol selector in the SSL handshake process.

public static interface
public static interface
JdkApplicationProtocolNegotiator.SslEngineWrapperFactory

Abstract factory pattern for wrapping an SSLEngine object.

Method Summary

Modifier and TypeMethod and Description
public JdkApplicationProtocolNegotiator.ProtocolSelectionListenerFactory
public JdkApplicationProtocolNegotiator.ProtocolSelectorFactory
public JdkApplicationProtocolNegotiator.SslEngineWrapperFactory
Inherited from io.netty5.handler.ssl.ApplicationProtocolNegotiator:
protocols

Method Detail

protocolListenerFactoryback to summary
public JdkApplicationProtocolNegotiator.ProtocolSelectionListenerFactory protocolListenerFactory()

Get the ProtocolSelectionListenerFactory.

protocolSelectorFactoryback to summary
public JdkApplicationProtocolNegotiator.ProtocolSelectorFactory protocolSelectorFactory()

Get the ProtocolSelectorFactory.

wrapperFactoryback to summary
public JdkApplicationProtocolNegotiator.SslEngineWrapperFactory wrapperFactory()

Get the SslEngineWrapperFactory.

io.netty5.handler.ssl back to summary

public abstract Class JdkApplicationProtocolNegotiator.AllocatorAwareSslEngineWrapperFactory

extends Object
implements SslEngineWrapperFactory
Class Inheritance
  • java.lang.Object
  • io.netty5.handler.ssl.JdkApplicationProtocolNegotiator.AllocatorAwareSslEngineWrapperFactory
All Implemented Interfaces
io.netty5.handler.ssl.JdkApplicationProtocolNegotiator.SslEngineWrapperFactory
Known Direct Subclasses
io.netty5.handler.ssl.JdkAlpnApplicationProtocolNegotiator.FailureWrapper, io.netty5.handler.ssl.JdkAlpnApplicationProtocolNegotiator.AlpnWrapper

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public final SSLEngine
wrapSslEngine(SSLEngine
The engine to wrap.
engine
,
JdkApplicationProtocolNegotiator
The application level protocol negotiator
applicationNegotiator
,
boolean
  • true if the engine is for server side of connections
  • false if the engine is for client side of connections
isServer
)

Implements io.netty5.handler.ssl.JdkApplicationProtocolNegotiator.SslEngineWrapperFactory.wrapSslEngine.

Deprecated as a consequence of JdkApplicationProtocolNegotiator being deprecated.
Abstract factory pattern for wrapping an SSLEngine object.
pack-priv abstract SSLEngine

Returns:

The resulting wrapped engine. This may just be engine.
wrapSslEngine
(SSLEngine
The engine to wrap.
engine
,
BufferAllocator
the buffer allocator.
alloc
,
JdkApplicationProtocolNegotiator
The application level protocol negotiator
applicationNegotiator
,
boolean
  • true if the engine is for server side of connections
  • false if the engine is for client side of connections
isServer
)

Deprecated as a consequence of JdkApplicationProtocolNegotiator being deprecated.
Abstract factory pattern for wrapping an SSLEngine object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AllocatorAwareSslEngineWrapperFactoryback to summary
public AllocatorAwareSslEngineWrapperFactory()

Method Detail

wrapSslEngineback to summary
public final SSLEngine wrapSslEngine(SSLEngine engine, JdkApplicationProtocolNegotiator applicationNegotiator, boolean isServer)

Implements io.netty5.handler.ssl.JdkApplicationProtocolNegotiator.SslEngineWrapperFactory.wrapSslEngine.

Doc from io.netty5.handler.ssl.JdkApplicationProtocolNegotiator.SslEngineWrapperFactory.wrapSslEngine.

Deprecated

as a consequence of JdkApplicationProtocolNegotiator being deprecated. See corresponding docs for further information.

Abstract factory pattern for wrapping an SSLEngine object. This is useful for NPN/APLN support.

Parameters
engine:SSLEngine

The engine to wrap.

applicationNegotiator:JdkApplicationProtocolNegotiator

The application level protocol negotiator

isServer:boolean

  • true if the engine is for server side of connections
  • false if the engine is for client side of connections
Returns:SSLEngine

The resulting wrapped engine. This may just be engine.

Annotations
@Override
wrapSslEngineback to summary
pack-priv abstract SSLEngine wrapSslEngine(SSLEngine engine, BufferAllocator alloc, JdkApplicationProtocolNegotiator applicationNegotiator, boolean isServer)

Deprecated

as a consequence of JdkApplicationProtocolNegotiator being deprecated. See corresponding docs for further information.

Abstract factory pattern for wrapping an SSLEngine object. This is useful for NPN/APLN support.

Parameters
engine:SSLEngine

The engine to wrap.

alloc:BufferAllocator

the buffer allocator.

applicationNegotiator:JdkApplicationProtocolNegotiator

The application level protocol negotiator

isServer:boolean

  • true if the engine is for server side of connections
  • false if the engine is for client side of connections
Returns:SSLEngine

The resulting wrapped engine. This may just be engine.

io.netty5.handler.ssl back to summary

public Interface JdkApplicationProtocolNegotiator.ProtocolSelectionListener

Known Direct Implementers
io.netty5.handler.ssl.JdkBaseApplicationProtocolNegotiator.NoFailProtocolSelectionListener

A listener to be notified by which protocol was select by its peer. Either the ProtocolSelectionListener#unsupported() OR the ProtocolSelectionListener#selected(String) method will be called for each SSL handshake.

Method Summary

Modifier and TypeMethod and Description
public void
selected(String
the protocol selected by the peer. May be null or empty as supported by the application negotiation protocol.
protocol
)

Callback invoked to let this application know the protocol chosen by the peer.

public void
unsupported()

Callback invoked to let the application know that the peer does not support this ApplicationProtocolNegotiator.

Method Detail

selectedback to summary
public void selected(String protocol) throws Exception

Callback invoked to let this application know the protocol chosen by the peer.

Parameters
protocol:String

the protocol selected by the peer. May be null or empty as supported by the application negotiation protocol.

Exceptions
Exception:
This may be thrown if the selected protocol is not acceptable and the desired behavior is to fail the handshake with a fatal alert.
unsupportedback to summary
public void unsupported()

Callback invoked to let the application know that the peer does not support this ApplicationProtocolNegotiator.

io.netty5.handler.ssl back to summary

public Interface JdkApplicationProtocolNegotiator.ProtocolSelectionListenerFactory


Factory interface for ProtocolSelectionListener objects.

Method Summary

Modifier and TypeMethod and Description
public JdkApplicationProtocolNegotiator.ProtocolSelectionListener

Returns:

A new instance of ProtocolSelectionListener.
newListener
(SSLEngine
The SSLEngine that the returned ProtocolSelectionListener will be used to create an instance for.
engine
,
List<String>
The protocols that are supported in preference order.
supportedProtocols
)

Generate a new instance of ProtocolSelectionListener.

Method Detail

newListenerback to summary
public JdkApplicationProtocolNegotiator.ProtocolSelectionListener newListener(SSLEngine engine, List<String> supportedProtocols)

Generate a new instance of ProtocolSelectionListener.

Parameters
engine:SSLEngine

The SSLEngine that the returned ProtocolSelectionListener will be used to create an instance for.

supportedProtocols:List<String>

The protocols that are supported in preference order.

Returns:JdkApplicationProtocolNegotiator.ProtocolSelectionListener

A new instance of ProtocolSelectionListener.

io.netty5.handler.ssl back to summary

public Interface JdkApplicationProtocolNegotiator.ProtocolSelector

Known Direct Implementers
io.netty5.handler.ssl.JdkBaseApplicationProtocolNegotiator.NoFailProtocolSelector

Interface to define the role of an application protocol selector in the SSL handshake process. Either ProtocolSelector#unsupported() OR ProtocolSelector#select(List) will be called for each SSL handshake.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the protocol selected by this ProtocolSelector. A null value will indicate the no protocols were selected but the handshake should not fail. The decision to fail the handshake is left to the other end negotiating the SSL handshake.
select
(List<String>
the protocols sent by the protocol advertiser
protocols
)

Callback invoked to select the application level protocol from the protocols provided.

public void
unsupported()

Callback invoked to let the application know that the peer does not support this ApplicationProtocolNegotiator.

Method Detail

selectback to summary
public String select(List<String> protocols) throws Exception

Callback invoked to select the application level protocol from the protocols provided.

Parameters
protocols:List<String>

the protocols sent by the protocol advertiser

Returns:String

the protocol selected by this ProtocolSelector. A null value will indicate the no protocols were selected but the handshake should not fail. The decision to fail the handshake is left to the other end negotiating the SSL handshake.

Exceptions
Exception:
If the protocols provide warrant failing the SSL handshake with a fatal alert.
unsupportedback to summary
public void unsupported()

Callback invoked to let the application know that the peer does not support this ApplicationProtocolNegotiator.

io.netty5.handler.ssl back to summary

public Interface JdkApplicationProtocolNegotiator.ProtocolSelectorFactory


Factory interface for ProtocolSelector objects.

Method Summary

Modifier and TypeMethod and Description
public JdkApplicationProtocolNegotiator.ProtocolSelector

Returns:

A new instance of ProtocolSelector.
newSelector
(SSLEngine
The SSLEngine that the returned ProtocolSelector will be used to create an instance for.
engine
,
Set<String>
The protocols that are supported.
supportedProtocols
)

Generate a new instance of ProtocolSelector.

Method Detail

newSelectorback to summary
public JdkApplicationProtocolNegotiator.ProtocolSelector newSelector(SSLEngine engine, Set<String> supportedProtocols)

Generate a new instance of ProtocolSelector.

Parameters
engine:SSLEngine

The SSLEngine that the returned ProtocolSelector will be used to create an instance for.

supportedProtocols:Set<String>

The protocols that are supported.

Returns:JdkApplicationProtocolNegotiator.ProtocolSelector

A new instance of ProtocolSelector.

io.netty5.handler.ssl back to summary

public Interface JdkApplicationProtocolNegotiator.SslEngineWrapperFactory

Known Direct Implementers
io.netty5.handler.ssl.JdkApplicationProtocolNegotiator.AllocatorAwareSslEngineWrapperFactory

Abstract factory pattern for wrapping an SSLEngine object. This is useful for NPN/APLN JDK support.

Method Summary

Modifier and TypeMethod and Description
public SSLEngine

Returns:

The resulting wrapped engine. This may just be engine.
wrapSslEngine
(SSLEngine
The engine to wrap.
engine
,
JdkApplicationProtocolNegotiator
The application level protocol negotiator
applicationNegotiator
,
boolean
  • true if the engine is for server side of connections
  • false if the engine is for client side of connections
isServer
)

Deprecated as a consequence of JdkApplicationProtocolNegotiator being deprecated.
Abstract factory pattern for wrapping an SSLEngine object.

Method Detail

wrapSslEngineback to summary
public SSLEngine wrapSslEngine(SSLEngine engine, JdkApplicationProtocolNegotiator applicationNegotiator, boolean isServer)

Deprecated

as a consequence of JdkApplicationProtocolNegotiator being deprecated. See corresponding docs for further information.

Abstract factory pattern for wrapping an SSLEngine object. This is useful for NPN/APLN support.

Parameters
engine:SSLEngine

The engine to wrap.

applicationNegotiator:JdkApplicationProtocolNegotiator

The application level protocol negotiator

isServer:boolean

  • true if the engine is for server side of connections
  • false if the engine is for client side of connections
Returns:SSLEngine

The resulting wrapped engine. This may just be engine.