|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.grizzly.filterchain.BaseFilter
org.glassfish.grizzly.filterchain.TransportFilter
public class TransportFilter
Transport Filter implementation, which should work with any
Transport. This Filter tries to delegate I/O event processing
to the Transport's specific transport Filter. If
Transport doesn't have own implementation - uses common I/O event
processing logic.
TransportFilter could be set to work in 2 modes: stream
or message. In stream mode,
TransportFilter produces/consumes the socket channel directly.
In message mode, TransportFilter represents Connection
data as Buffer, using FilterChainContext.getMessage()},
FilterChainContext.setMessage(Object).
For specific Transport, one mode could be more preferable than another.
For example TCPNIOTransport works just in
stream mode. UDPNIOTransport
prefers message mode, but could also work
in stream mode.
| Nested Class Summary | |
|---|---|
static class |
TransportFilter.FlushEvent
|
| Constructor Summary | |
|---|---|
TransportFilter()
Create TransportFilter. |
|
| Method Summary | |
|---|---|
static FilterChainEvent |
createFlushEvent()
|
static FilterChainEvent |
createFlushEvent(CompletionHandler completionHandler)
|
protected Filter |
getTransportFilter0(Transport transport)
Get default Transport specific transport filter. |
NextAction |
handleAccept(FilterChainContext ctx)
Delegates accept operation to Transport's specific transport
filter. |
NextAction |
handleClose(FilterChainContext ctx)
Delegates close operation to Transport's specific transport
filter. |
NextAction |
handleConnect(FilterChainContext ctx)
Delegates connect operation to Transport's specific transport
filter. |
NextAction |
handleEvent(FilterChainContext ctx,
FilterChainEvent event)
Delegates event operation to Transport's specific transport
filter. |
NextAction |
handleRead(FilterChainContext ctx)
Delegates reading operation to Transport's specific transport
filter. |
NextAction |
handleWrite(FilterChainContext ctx)
Delegates writing operation to Transport's specific transport
filter. |
| Methods inherited from class org.glassfish.grizzly.filterchain.BaseFilter |
|---|
createContext, exceptionOccurred, getFilterChain, getIndex, onAdded, onFilterChainChanged, onRemoved |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TransportFilter()
| Method Detail |
|---|
public static FilterChainEvent createFlushEvent()
public static FilterChainEvent createFlushEvent(CompletionHandler completionHandler)
public NextAction handleAccept(FilterChainContext ctx)
throws java.io.IOException
Transport's specific transport
filter.
handleAccept in interface FilterhandleAccept in class BaseFilterctx - FilterChainContext
NextAction instruction for FilterChain, how it
should continue the execution
java.io.IOException
public NextAction handleConnect(FilterChainContext ctx)
throws java.io.IOException
Transport's specific transport
filter.
handleConnect in interface FilterhandleConnect in class BaseFilterctx - FilterChainContext
NextAction instruction for FilterChain, how it
should continue the execution
java.io.IOException
public NextAction handleRead(FilterChainContext ctx)
throws java.io.IOException
Transport's specific transport
filter.
handleRead in interface FilterhandleRead in class BaseFilterctx - FilterChainContext
NextAction instruction for FilterChain, how it
should continue the execution
java.io.IOException
public NextAction handleWrite(FilterChainContext ctx)
throws java.io.IOException
Transport's specific transport
filter.
handleWrite in interface FilterhandleWrite in class BaseFilterctx - FilterChainContext
NextAction instruction for FilterChain, how it
should continue the execution
java.io.IOException
public NextAction handleEvent(FilterChainContext ctx,
FilterChainEvent event)
throws java.io.IOException
Transport's specific transport
filter.
handleEvent in interface FilterhandleEvent in class BaseFilterctx - FilterChainContext
NextAction instruction for FilterChain, how it
should continue the execution
java.io.IOException
public NextAction handleClose(FilterChainContext ctx)
throws java.io.IOException
Transport's specific transport
filter.
handleClose in interface FilterhandleClose in class BaseFilterctx - FilterChainContext
NextAction instruction for FilterChain, how it
should continue the execution
java.io.IOExceptionprotected Filter getTransportFilter0(Transport transport)
Transport specific transport filter.
transport - Transport.
Transport specific transport filter.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||