public class LifeCycleFilter extends BaseFilter
Filter, which tracks the connections
lifecycle. The new connections could be either accepted if we have server,
or connected, if we establish client connection.| Constructor and Description |
|---|
LifeCycleFilter() |
| Modifier and Type | Method and Description |
|---|---|
Set<Connection> |
getActiveConnections()
Returns the
Set of currently active Connections. |
int |
getTotalConnections()
Returns the total number of connections ever
created by the
Transport |
NextAction |
handleAccept(FilterChainContext ctx)
Method is called, when new
Connection was
accepted by a Transport |
NextAction |
handleClose(FilterChainContext ctx)
Method is called, when the
Connection is getting closed |
NextAction |
handleConnect(FilterChainContext ctx)
Method is called, when new client
Connection was
connected to some endpoint |
createContext, exceptionOccurred, handleEvent, handleRead, handleWrite, onAdded, onFilterChainChanged, onRemoved, toStringpublic NextAction handleAccept(FilterChainContext ctx) throws IOException
Connection was
accepted by a TransporthandleAccept in interface FilterhandleAccept in class BaseFilterctx - the filter chain contextIOExceptionpublic NextAction handleConnect(FilterChainContext ctx) throws IOException
Connection was
connected to some endpointhandleConnect in interface FilterhandleConnect in class BaseFilterctx - the filter chain contextIOExceptionpublic NextAction handleClose(FilterChainContext ctx) throws IOException
Connection is getting closedhandleClose in interface FilterhandleClose in class BaseFilterctx - the filter chain contextIOExceptionpublic int getTotalConnections()
TransportTransportpublic Set<Connection> getActiveConnections()
Set of currently active Connections.Set of currently active ConnectionsCopyright © 2016 Oracle Corporation. All rights reserved.