public class GridNioSslFilter extends GridNioFilterAdapter
SSLEngine| Modifier and Type | Field and Description |
|---|---|
static int |
HANDSHAKE_FUT_META_KEY
SSL handshake future metadata key.
|
nextFilter, prevFilter| Constructor and Description |
|---|
GridNioSslFilter(SSLContext sslCtx,
boolean directBuf,
ByteOrder order,
IgniteLogger log)
Creates SSL filter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clientMode(boolean clientMode) |
boolean |
directMode() |
void |
directMode(boolean directMode) |
void |
enabledCipherSuites(String... enabledCipherSuites)
Sets a set of cipher suites that will be enabled for this filter.
|
void |
enabledProtocols(String... enabledProtos)
Sets enabled secure protocols for this filter.
|
ByteBuffer |
encrypt(GridNioSession ses,
ByteBuffer input) |
boolean |
lock(GridNioSession ses) |
void |
needClientAuth(boolean needClientAuth)
Sets flag indicating whether client authentication will be required.
|
void |
onExceptionCaught(GridNioSession ses,
IgniteCheckedException ex)
Invoked when exception is caught in filter processing.
|
void |
onMessageReceived(GridNioSession ses,
Object msg)
Invoked when a new messages received.
|
GridNioFuture<Boolean> |
onSessionClose(GridNioSession ses)
Invoked when a session close request is performed on session.
|
void |
onSessionClosed(GridNioSession ses)
Invoked after session get closed.
|
void |
onSessionIdleTimeout(GridNioSession ses)
Called when session is idle for longer time that is
allowed by NIO server.
|
void |
onSessionOpened(GridNioSession ses)
Invoked when a new session was created.
|
GridNioFuture<?> |
onSessionWrite(GridNioSession ses,
Object msg,
boolean fut,
IgniteInClosure<IgniteException> ackC)
Invoked when a write request is performed on a session.
|
void |
onSessionWriteTimeout(GridNioSession ses)
Called when session has not empty write buffer that has not been fully
flushed during max timeout allowed by NIO server.
|
void |
unlock(GridNioSession ses) |
void |
wantClientAuth(boolean wantClientAuth)
Sets flag indicating whether client authentication will be requested during handshake.
|
nextFilter, nextFilter, onPauseReads, onResumeReads, previousFilter, previousFilter, proceedExceptionCaught, proceedMessageReceived, proceedPauseReads, proceedResumeReads, proceedSessionClose, proceedSessionClosed, proceedSessionIdleTimeout, proceedSessionOpened, proceedSessionWrite, proceedSessionWriteTimeout, start, stop, toStringpublic static final int HANDSHAKE_FUT_META_KEY
public GridNioSslFilter(SSLContext sslCtx, boolean directBuf, ByteOrder order, IgniteLogger log)
sslCtx - SSL context.directBuf - Direct buffer flag.order - Byte order.log - Logger to use.public void clientMode(boolean clientMode)
clientMode - Flag indicating whether SSLEngine should use client mode..public void directMode(boolean directMode)
directMode - Flag indicating whether direct mode is used.public boolean directMode()
public void wantClientAuth(boolean wantClientAuth)
wantClientAuth - True if client authentication should be requested.public void needClientAuth(boolean needClientAuth)
needClientAuth - True if client authentication is required.public void enabledCipherSuites(String... enabledCipherSuites)
enabledCipherSuites - Enabled cipher suites.public void enabledProtocols(String... enabledProtos)
enabledProtos - Enabled protocols.public void onSessionOpened(GridNioSession ses) throws IgniteCheckedException
ses - Opened session.IgniteCheckedException - If GridNioException occurred while handling event.public void onSessionClosed(GridNioSession ses) throws IgniteCheckedException
ses - Closed session.IgniteCheckedException - If GridNioException occurred while handling event.public void onExceptionCaught(GridNioSession ses, IgniteCheckedException ex) throws IgniteCheckedException
ses - Session that caused IgniteCheckedException.ex - GridNioException instance.IgniteCheckedException - If IgniteCheckedException occurred while handling event.public boolean lock(GridNioSession ses)
ses - Session.public void unlock(GridNioSession ses)
ses - NIO session.public ByteBuffer encrypt(GridNioSession ses, ByteBuffer input) throws SSLException
ses - Session.input - Data to encrypt.SSLException - If failed to encrypt.public GridNioFuture<?> onSessionWrite(GridNioSession ses, Object msg, boolean fut, IgniteInClosure<IgniteException> ackC) throws IgniteCheckedException
ses - Session on which message should be written.msg - Message being written.fut - True if write future should be created.ackC - Closure invoked when message ACK is received.null.GridNioException - If GridNioException occurred while handling event.IgniteCheckedExceptionpublic void onMessageReceived(GridNioSession ses, Object msg) throws IgniteCheckedException
ses - Session on which message was received.msg - Received message.IgniteCheckedException - If IgniteCheckedException occurred while handling event.public GridNioFuture<Boolean> onSessionClose(GridNioSession ses) throws IgniteCheckedException
ses - Session to close.IgniteCheckedException - If IgniteCheckedException occurred while handling event.public void onSessionIdleTimeout(GridNioSession ses) throws IgniteCheckedException
ses - Session that is idle.IgniteCheckedException - If filter is not in chain or GridNioException occurred in the underlying filter.public void onSessionWriteTimeout(GridNioSession ses) throws IgniteCheckedException
ses - Session that has timed out writes.IgniteCheckedException - If filter is not in chain or GridNioException occurred in the underlying filter.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017