public class GridNioFilterChain<T> extends GridNioFilterAdapter
nextFilter, prevFilter| Constructor and Description |
|---|
GridNioFilterChain(IgniteLogger log,
GridNioServerListener<T> lsnr,
GridNioFilter head,
GridNioFilter... filters)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
onExceptionCaught(GridNioSession ses,
IgniteCheckedException e)
Starts chain notification from head to tail.
|
void |
onMessageReceived(GridNioSession ses,
Object msg)
Starts chain notification from head to tail.
|
GridNioFuture<?> |
onPauseReads(GridNioSession ses)
Starts chain notification from tail to head.
|
GridNioFuture<?> |
onResumeReads(GridNioSession ses)
Starts chain notification from tail to head.
|
GridNioFuture<Boolean> |
onSessionClose(GridNioSession ses)
Starts chain notification from tail to head.
|
void |
onSessionClosed(GridNioSession ses)
Starts chain notification from head to tail.
|
void |
onSessionIdleTimeout(GridNioSession ses)
Called when session is idle for longer time that is
allowed by NIO server.
|
void |
onSessionOpened(GridNioSession ses)
Starts chain notification from head to tail.
|
GridNioFuture<?> |
onSessionWrite(GridNioSession ses,
Object msg,
boolean fut,
IgniteInClosure<IgniteException> ackC)
Starts chain notification from tail to head.
|
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 |
start()
Starts all filters in order from application layer to the network layer.
|
void |
stop()
Stops all filters in order from network layer to the application layer.
|
String |
toString() |
nextFilter, nextFilter, previousFilter, previousFilter, proceedExceptionCaught, proceedMessageReceived, proceedPauseReads, proceedResumeReads, proceedSessionClose, proceedSessionClosed, proceedSessionIdleTimeout, proceedSessionOpened, proceedSessionWrite, proceedSessionWriteTimeoutpublic GridNioFilterChain(IgniteLogger log, GridNioServerListener<T> lsnr, GridNioFilter head, GridNioFilter... filters)
log - Logger instance.lsnr - Listener for events passed through chain.head - First filter in chain, it expected to be connected to actual endpoint.filters - Filters applied between listener and head. Will be inserted in the same order,
so chain will look like (lsnr) -> (filters[0]) -> ... -> (filters[n]) -> (head).public String toString()
toString in class GridNioFilterAdapterpublic void start()
start in interface GridNioFilterstart in class GridNioFilterAdapterpublic void stop()
stop in interface GridNioFilterstop in class GridNioFilterAdapterpublic void onSessionOpened(GridNioSession ses) throws IgniteCheckedException
ses - Session that was created.IgniteCheckedException - If IgniteCheckedException occurred while handling event.public void onSessionClosed(GridNioSession ses) throws IgniteCheckedException
ses - Session that was closed.IgniteCheckedException - If IgniteCheckedException occurred while handling event.public void onExceptionCaught(GridNioSession ses, IgniteCheckedException e)
ses - Session in which GridNioException was caught.e - IgniteCheckedException instance.public void onMessageReceived(GridNioSession ses, Object msg) throws IgniteCheckedException
ses - Session in which message was received.msg - Received message.IgniteCheckedException - If IgniteCheckedException occurred while handling event.public GridNioFuture<?> onSessionWrite(GridNioSession ses, Object msg, boolean fut, IgniteInClosure<IgniteException> ackC) throws IgniteCheckedException
ses - Session to which message should be written.msg - Message to write.fut - True if write future should be created.ackC - Closure invoked when message ACK is received.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.public GridNioFuture<?> onPauseReads(GridNioSession ses) throws IgniteCheckedException
onPauseReads in interface GridNioFilteronPauseReads in class GridNioFilterAdapterses - Session to pause reads.IgniteCheckedException - If IgniteCheckedException occurred while handling event.public GridNioFuture<?> onResumeReads(GridNioSession ses) throws IgniteCheckedException
onResumeReads in interface GridNioFilteronResumeReads in class GridNioFilterAdapterses - Session to resume reads.IgniteCheckedException - If IgniteCheckedException occurred while handling event.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.9.1 Release Date : December 9 2020