OptionalSslHandler is a utility decoder to support both SSL and non-SSL handlers
based on the first message received.
| Modifier and Type | Field and Description |
|---|---|
| private final SslContext |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | decode(ChannelHandlerContext
the context, ByteBuf ChannelHandlerContext which this ByteToMessageDecoder belongs tothe in, List<Object> ByteBuf from which to read datathe out)List to which decoded messages should be addedImplements abstract io. ByteBuf to an other.
|
| private void | |
| private void | |
| protected ChannelHandler | Returns: theChannelHandler which will replace the OptionalSslHandler in the pipeline
or null to simply remove the OptionalSslHandler if the traffic is non-SSL.the context)ChannelHandlerContext to use.Override to configure the ChannelHandler. |
| protected String | Returns: the name of the non-SSL handler.Optionally specify the non-SSL handler name, this method may return |
| protected SslHandler | Returns: theSslHandler which will replace the OptionalSslHandler in the pipeline if the
traffic is SSL.the context, SslContext ChannelHandlerContext to use.the sslContext)SSLContext to use.Override to configure the SslHandler eg. |
| protected String | Returns: the name of the SSL handler.Optionally specify the SSL handler name, this method may return |
| sslContext | back to summary |
|---|---|
| private final SslContext sslContext | |
| OptionalSslHandler | back to summary |
|---|---|
| public OptionalSslHandler(SslContext sslContext) | |
| decode | back to summary |
|---|---|
| protected void decode(ChannelHandlerContext context, ByteBuf in, List<Object> out) throws Exception Implements abstract io. Doc from io. Decode the from one
| |
| handleNonSsl | back to summary |
|---|---|
| private void handleNonSsl(ChannelHandlerContext context) | |
| handleSsl | back to summary |
|---|---|
| private void handleSsl(ChannelHandlerContext context) | |
| newNonSslHandler | back to summary |
|---|---|
| protected ChannelHandler newNonSslHandler(ChannelHandlerContext context) Override to configure the ChannelHandler.
| |
| newNonSslHandlerName | back to summary |
|---|---|
| protected String newNonSslHandlerName() Optionally specify the non-SSL handler name, this method may return
| |
| newSslHandler | back to summary |
|---|---|
| protected SslHandler newSslHandler(ChannelHandlerContext context, SslContext sslContext) Override to configure the SslHandler eg.
| |
| newSslHandlerName | back to summary |
|---|---|
| protected String newSslHandlerName() Optionally specify the SSL handler name, this method may return
| |