public class SslFilter extends Object implements OobFilter<ByteBuffer,ByteBuffer>
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
log
The global
Logger instance. |
protected OobFilter<ByteBuffer,ByteBuffer> |
tlsOffFilter
The
Filter to use when TLS is off. |
protected OobFilter<ByteBuffer,ByteBuffer> |
tlsOnFilter
The
Filter to use when TLS is on. |
Modifier | Constructor and Description |
---|---|
protected |
SslFilter(SSLEngine engine,
FilteredHandler<?,?,?> handler,
Executor executor)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
applyInbound(Queue<ByteBuffer> inputs,
Queue<ByteBuffer> outputs)
Filters traffic in the inbound direction.
|
void |
applyInboundOob(Queue<OobEvent> inputs,
Queue<OobEvent> outputs)
Processes an
OobEvent as it would apply to the inbound direction. |
void |
applyOutbound(Queue<ByteBuffer> inputs,
Queue<ByteBuffer> outputs)
Filters traffic in the outbound direction.
|
void |
applyOutboundOob(Queue<OobEvent> inputs,
Queue<OobEvent> outputs)
Processes an
OobEvent as it would apply to the outbound direction. |
protected static void |
debug(String format,
Object... args)
Logs a debugging message.
|
protected void |
debugHandshakeStatusInbound(SSLEngineResult result)
Logs a debugging message based on the current
SSLEngineResult.HandshakeStatus for the inbound direction. |
protected void |
debugHandshakeStatusOutbound(SSLEngineResult result)
Logs a debugging message based on the current
SSLEngineResult.HandshakeStatus for the outbound direction. |
protected void |
debugStatusInbound(SSLEngineResult result)
Logs a debugging message based on the current
SSLEngineResult.Status for the inbound direction. |
protected void |
debugStatusOutbound(SSLEngineResult result)
Logs a debugging message based on the current
SSLEngineResult.Status for the outbound direction. |
protected void |
runDelegatedTasks()
Runs delegated tasks.
|
protected void |
setTlsOffFilter()
Sets
tlsOffFilter . |
protected void |
setTlsOnFilter()
Sets
tlsOnFilter . |
protected static final org.slf4j.Logger log
Logger
instance.protected final OobFilter<ByteBuffer,ByteBuffer> tlsOnFilter
Filter
to use when TLS is on.protected final OobFilter<ByteBuffer,ByteBuffer> tlsOffFilter
Filter
to use when TLS is off.protected SslFilter(SSLEngine engine, FilteredHandler<?,?,?> handler, Executor executor)
engine
- the SSLEngine
for encryption/decryption of traffic.handler
- the associated FilteredHandler
.executor
- the Executor
for carrying out delegated tasks.public void applyInbound(Queue<ByteBuffer> inputs, Queue<ByteBuffer> outputs)
Filter
applyInbound
in interface Filter<ByteBuffer,ByteBuffer>
inputs
- the input Queue
.outputs
- the output Queue
.public void applyOutbound(Queue<ByteBuffer> inputs, Queue<ByteBuffer> outputs)
Filter
applyOutbound
in interface Filter<ByteBuffer,ByteBuffer>
inputs
- the input Queue
.outputs
- the output Queue
.public void applyInboundOob(Queue<OobEvent> inputs, Queue<OobEvent> outputs)
OobFilter
OobEvent
as it would apply to the inbound direction.applyInboundOob
in interface OobFilter<ByteBuffer,ByteBuffer>
inputs
- the input event Queue
.outputs
- the output event Queue
.public void applyOutboundOob(Queue<OobEvent> inputs, Queue<OobEvent> outputs)
OobFilter
OobEvent
as it would apply to the outbound direction.applyOutboundOob
in interface OobFilter<ByteBuffer,ByteBuffer>
inputs
- the input event Queue
.outputs
- the output event Queue
.protected void setTlsOnFilter()
tlsOnFilter
.protected void setTlsOffFilter()
tlsOffFilter
.protected void runDelegatedTasks()
protected void debugStatusInbound(SSLEngineResult result)
SSLEngineResult.Status
for the inbound direction.protected void debugHandshakeStatusInbound(SSLEngineResult result)
SSLEngineResult.HandshakeStatus
for the inbound direction.protected void debugStatusOutbound(SSLEngineResult result)
SSLEngineResult.Status
for the outbound direction.protected void debugHandshakeStatusOutbound(SSLEngineResult result)
SSLEngineResult.HandshakeStatus
for the outbound direction.