JdkApplicationProtocolNegotiator Type — netty Architecture
Architecture documentation for the JdkApplicationProtocolNegotiator type/interface in JdkApplicationProtocolNegotiator.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 589dfcd1_863e_223c_6915_a97af0407590["JdkApplicationProtocolNegotiator"] 2970a53b_8cf0_20f8_bec3_1a06d779e2e9["JdkApplicationProtocolNegotiator.java"] 589dfcd1_863e_223c_6915_a97af0407590 -->|defined in| 2970a53b_8cf0_20f8_bec3_1a06d779e2e9 style 589dfcd1_863e_223c_6915_a97af0407590 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
handler/src/main/java/io/netty/handler/ssl/JdkApplicationProtocolNegotiator.java lines 28–162
@Deprecated
public interface JdkApplicationProtocolNegotiator extends ApplicationProtocolNegotiator {
/**
* Abstract factory pattern for wrapping an {@link SSLEngine} object. This is useful for NPN/APLN JDK support.
*/
interface SslEngineWrapperFactory {
/**
* Abstract factory pattern for wrapping an {@link SSLEngine} object. This is useful for NPN/APLN support.
*
* @param engine The engine to wrap.
* @param applicationNegotiator The application level protocol negotiator
* @param isServer <ul>
* <li>{@code true} if the engine is for server side of connections</li>
* <li>{@code false} if the engine is for client side of connections</li>
* </ul>
* @return The resulting wrapped engine. This may just be {@code engine}.
*/
SSLEngine wrapSslEngine(
SSLEngine engine, JdkApplicationProtocolNegotiator applicationNegotiator, boolean isServer);
}
abstract class AllocatorAwareSslEngineWrapperFactory implements SslEngineWrapperFactory {
@Override
public final SSLEngine wrapSslEngine(SSLEngine engine,
JdkApplicationProtocolNegotiator applicationNegotiator, boolean isServer) {
return wrapSslEngine(engine, ByteBufAllocator.DEFAULT, applicationNegotiator, isServer);
}
/**
* Abstract factory pattern for wrapping an {@link SSLEngine} object. This is useful for NPN/APLN support.
*
* @param engine The engine to wrap.
* @param alloc the buffer allocator.
* @param applicationNegotiator The application level protocol negotiator
* @param isServer <ul>
* <li>{@code true} if the engine is for server side of connections</li>
* <li>{@code false} if the engine is for client side of connections</li>
* </ul>
* @return The resulting wrapped engine. This may just be {@code engine}.
*/
abstract SSLEngine wrapSslEngine(SSLEngine engine, ByteBufAllocator alloc,
JdkApplicationProtocolNegotiator applicationNegotiator, boolean isServer);
}
/**
* Interface to define the role of an application protocol selector in the SSL handshake process. Either
* {@link ProtocolSelector#unsupported()} OR {@link ProtocolSelector#select(List)} will be called for each SSL
* handshake.
*/
interface ProtocolSelector {
/**
* Callback invoked to let the application know that the peer does not support this
* {@link ApplicationProtocolNegotiator}.
*/
void unsupported();
/**
* Callback invoked to select the application level protocol from the {@code protocols} provided.
*
* @param protocols the protocols sent by the protocol advertiser
* @return the protocol selected by this {@link ProtocolSelector}. A {@code 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.
* @throws Exception If the {@code protocols} provide warrant failing the SSL handshake with a fatal alert.
*/
String select(List<String> protocols) throws Exception;
}
/**
* A listener to be notified by which protocol was select by its peer. Either the
* {@link ProtocolSelectionListener#unsupported()} OR the {@link ProtocolSelectionListener#selected(String)} method
* will be called for each SSL handshake.
*/
interface ProtocolSelectionListener {
/**
* Callback invoked to let the application know that the peer does not support this
* {@link ApplicationProtocolNegotiator}.
*/
void unsupported();
Source
Frequently Asked Questions
What is the JdkApplicationProtocolNegotiator type?
JdkApplicationProtocolNegotiator is a type/interface in the netty codebase, defined in handler/src/main/java/io/netty/handler/ssl/JdkApplicationProtocolNegotiator.java.
Where is JdkApplicationProtocolNegotiator defined?
JdkApplicationProtocolNegotiator is defined in handler/src/main/java/io/netty/handler/ssl/JdkApplicationProtocolNegotiator.java at line 28.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free