Class TCPNIOTransportFilter
- java.lang.Object
-
- org.glassfish.grizzly.filterchain.BaseFilter
-
- org.glassfish.grizzly.nio.transport.TCPNIOTransportFilter
-
- All Implemented Interfaces:
Filter
public final class TCPNIOTransportFilter extends BaseFilter
TheTCPNIOTransport
's transportFilter
implementation- Author:
- Alexey Stashok
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
exceptionOccurred(FilterChainContext ctx, Throwable error)
Notification about exception, occurred on theFilterChain
NextAction
handleEvent(FilterChainContext ctx, FilterChainEvent event)
Handle custom event associated with theConnection
.NextAction
handleRead(FilterChainContext ctx)
Execute a unit of processing work to be performed, when channel will become available for reading.NextAction
handleWrite(FilterChainContext ctx)
Execute a unit of processing work to be performed, when some data should be written on channel.-
Methods inherited from class org.glassfish.grizzly.filterchain.BaseFilter
createContext, handleAccept, handleClose, handleConnect, onAdded, onFilterChainChanged, onRemoved, toString
-
-
-
-
Method Detail
-
handleRead
public NextAction handleRead(FilterChainContext ctx) throws IOException
Description copied from class:BaseFilter
Execute a unit of processing work to be performed, when channel will become available for reading. ThisFilter
may either complete the required processing and return false, or delegate remaining processing to the nextFilter
in aFilterChain
containing thisFilter
by returning true.- Specified by:
handleRead
in interfaceFilter
- Overrides:
handleRead
in classBaseFilter
- Parameters:
ctx
-FilterChainContext
- Returns:
NextAction
instruction forFilterChain
, how it should continue the execution- Throws:
IOException
-
handleWrite
public NextAction handleWrite(FilterChainContext ctx) throws IOException
Description copied from class:BaseFilter
Execute a unit of processing work to be performed, when some data should be written on channel. ThisFilter
may either complete the required processing and return false, or delegate remaining processing to the nextFilter
in aFilterChain
containing thisFilter
by returning true.- Specified by:
handleWrite
in interfaceFilter
- Overrides:
handleWrite
in classBaseFilter
- Parameters:
ctx
-FilterChainContext
- Returns:
NextAction
instruction forFilterChain
, how it should continue the execution- Throws:
IOException
-
handleEvent
public NextAction handleEvent(FilterChainContext ctx, FilterChainEvent event) throws IOException
Description copied from class:BaseFilter
Handle custom event associated with theConnection
. ThisFilter
may either complete the required processing and returnStopAction
, or delegate remaining processing to the nextFilter
in aFilterChain
containing thisFilter
by returningInvokeAction
.- Specified by:
handleEvent
in interfaceFilter
- Overrides:
handleEvent
in classBaseFilter
- Parameters:
ctx
-FilterChainContext
- Returns:
NextAction
instruction forFilterChain
, how it should continue the execution- Throws:
IOException
-
exceptionOccurred
public void exceptionOccurred(FilterChainContext ctx, Throwable error)
Description copied from class:BaseFilter
Notification about exception, occurred on theFilterChain
- Specified by:
exceptionOccurred
in interfaceFilter
- Overrides:
exceptionOccurred
in classBaseFilter
- Parameters:
ctx
- event processingFilterChainContext
error
- error, which occurred during FilterChain execution
-
-