JdkBaseApplicationProtocolNegotiator Class — netty Architecture
Architecture documentation for the JdkBaseApplicationProtocolNegotiator class in JdkBaseApplicationProtocolNegotiator.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD bc7b5d25_75b2_4ce5_c71f_e790ac9a6f57["JdkBaseApplicationProtocolNegotiator"] 343cd5c6_735e_911b_ea1e_6891d57066f3["JdkBaseApplicationProtocolNegotiator.java"] bc7b5d25_75b2_4ce5_c71f_e790ac9a6f57 -->|defined in| 343cd5c6_735e_911b_ea1e_6891d57066f3 b082a9e9_a2fd_8303_1189_b9895d0b25de["JdkBaseApplicationProtocolNegotiator()"] bc7b5d25_75b2_4ce5_c71f_e790ac9a6f57 -->|method| b082a9e9_a2fd_8303_1189_b9895d0b25de df1917fc_b511_74d8_2a76_1f80ad488fdb["protocols()"] bc7b5d25_75b2_4ce5_c71f_e790ac9a6f57 -->|method| df1917fc_b511_74d8_2a76_1f80ad488fdb 88c1ac37_d5d4_db32_7bc6_d523cec66104["ProtocolSelectorFactory()"] bc7b5d25_75b2_4ce5_c71f_e790ac9a6f57 -->|method| 88c1ac37_d5d4_db32_7bc6_d523cec66104 f5093267_0d60_921e_ff62_a59bb77f8ac7["ProtocolSelectionListenerFactory()"] bc7b5d25_75b2_4ce5_c71f_e790ac9a6f57 -->|method| f5093267_0d60_921e_ff62_a59bb77f8ac7 2b109241_54f3_5042_46d3_92cbb907d4d9["SslEngineWrapperFactory()"] bc7b5d25_75b2_4ce5_c71f_e790ac9a6f57 -->|method| 2b109241_54f3_5042_46d3_92cbb907d4d9
Relationship Graph
Source Code
handler/src/main/java/io/netty/handler/ssl/JdkBaseApplicationProtocolNegotiator.java lines 31–209
class JdkBaseApplicationProtocolNegotiator implements JdkApplicationProtocolNegotiator {
private final List<String> protocols;
private final ProtocolSelectorFactory selectorFactory;
private final ProtocolSelectionListenerFactory listenerFactory;
private final SslEngineWrapperFactory wrapperFactory;
/**
* Create a new instance.
* @param wrapperFactory Determines which application protocol will be used by wrapping the SSLEngine in use.
* @param selectorFactory How the peer selecting the protocol should behave.
* @param listenerFactory How the peer being notified of the selected protocol should behave.
* @param protocols The order of iteration determines the preference of support for protocols.
*/
JdkBaseApplicationProtocolNegotiator(SslEngineWrapperFactory wrapperFactory,
ProtocolSelectorFactory selectorFactory, ProtocolSelectionListenerFactory listenerFactory,
Iterable<String> protocols) {
this(wrapperFactory, selectorFactory, listenerFactory, toList(protocols));
}
/**
* Create a new instance.
* @param wrapperFactory Determines which application protocol will be used by wrapping the SSLEngine in use.
* @param selectorFactory How the peer selecting the protocol should behave.
* @param listenerFactory How the peer being notified of the selected protocol should behave.
* @param protocols The order of iteration determines the preference of support for protocols.
*/
JdkBaseApplicationProtocolNegotiator(SslEngineWrapperFactory wrapperFactory,
ProtocolSelectorFactory selectorFactory, ProtocolSelectionListenerFactory listenerFactory,
String... protocols) {
this(wrapperFactory, selectorFactory, listenerFactory, toList(protocols));
}
/**
* Create a new instance.
* @param wrapperFactory Determines which application protocol will be used by wrapping the SSLEngine in use.
* @param selectorFactory How the peer selecting the protocol should behave.
* @param listenerFactory How the peer being notified of the selected protocol should behave.
* @param protocols The order of iteration determines the preference of support for protocols.
*/
private JdkBaseApplicationProtocolNegotiator(SslEngineWrapperFactory wrapperFactory,
ProtocolSelectorFactory selectorFactory, ProtocolSelectionListenerFactory listenerFactory,
List<String> protocols) {
this.wrapperFactory = checkNotNull(wrapperFactory, "wrapperFactory");
this.selectorFactory = checkNotNull(selectorFactory, "selectorFactory");
this.listenerFactory = checkNotNull(listenerFactory, "listenerFactory");
this.protocols = Collections.unmodifiableList(checkNotNull(protocols, "protocols"));
}
@Override
public List<String> protocols() {
return protocols;
}
@Override
public ProtocolSelectorFactory protocolSelectorFactory() {
return selectorFactory;
}
@Override
public ProtocolSelectionListenerFactory protocolListenerFactory() {
return listenerFactory;
}
@Override
public SslEngineWrapperFactory wrapperFactory() {
return wrapperFactory;
}
static final ProtocolSelectorFactory FAIL_SELECTOR_FACTORY = new ProtocolSelectorFactory() {
@Override
public ProtocolSelector newSelector(SSLEngine engine, Set<String> supportedProtocols) {
return new FailProtocolSelector((JdkSslEngine) engine, supportedProtocols);
}
};
static final ProtocolSelectorFactory NO_FAIL_SELECTOR_FACTORY = new ProtocolSelectorFactory() {
@Override
public ProtocolSelector newSelector(SSLEngine engine, Set<String> supportedProtocols) {
return new NoFailProtocolSelector((JdkSslEngine) engine, supportedProtocols);
}
};
Source
Frequently Asked Questions
What is the JdkBaseApplicationProtocolNegotiator class?
JdkBaseApplicationProtocolNegotiator is a class in the netty codebase, defined in handler/src/main/java/io/netty/handler/ssl/JdkBaseApplicationProtocolNegotiator.java.
Where is JdkBaseApplicationProtocolNegotiator defined?
JdkBaseApplicationProtocolNegotiator is defined in handler/src/main/java/io/netty/handler/ssl/JdkBaseApplicationProtocolNegotiator.java at line 31.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free