org.glassfish.grizzly.nio.transport
Class TCPNIOTransportFilter

java.lang.Object
  extended by org.glassfish.grizzly.filterchain.BaseFilter
      extended by org.glassfish.grizzly.nio.transport.TCPNIOTransportFilter
All Implemented Interfaces:
Filter

public final class TCPNIOTransportFilter
extends BaseFilter

The TCPNIOTransport's transport Filter implementation

Author:
Alexey Stashok

Method Summary
 void exceptionOccurred(FilterChainContext ctx, java.lang.Throwable error)
          Notification about exception, occurred on the FilterChain
 NextAction handleEvent(FilterChainContext ctx, FilterChainEvent event)
          Handle custom event associated with the Connection.
 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, getFilterChain, getIndex, handleAccept, handleClose, handleConnect, onAdded, onFilterChainChanged, onRemoved
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

handleRead

public NextAction handleRead(FilterChainContext ctx)
                      throws java.io.IOException
Description copied from class: BaseFilter
Execute a unit of processing work to be performed, when channel will become available for reading. This Filter may either complete the required processing and return false, or delegate remaining processing to the next Filter in a FilterChain containing this Filter by returning true.

Specified by:
handleRead in interface Filter
Overrides:
handleRead in class BaseFilter
Parameters:
ctx - FilterChainContext
Returns:
NextAction instruction for FilterChain, how it should continue the execution
Throws:
java.io.IOException

handleWrite

public NextAction handleWrite(FilterChainContext ctx)
                       throws java.io.IOException
Description copied from class: BaseFilter
Execute a unit of processing work to be performed, when some data should be written on channel. This Filter may either complete the required processing and return false, or delegate remaining processing to the next Filter in a FilterChain containing this Filter by returning true.

Specified by:
handleWrite in interface Filter
Overrides:
handleWrite in class BaseFilter
Parameters:
ctx - FilterChainContext
Returns:
NextAction instruction for FilterChain, how it should continue the execution
Throws:
java.io.IOException

handleEvent

public NextAction handleEvent(FilterChainContext ctx,
                              FilterChainEvent event)
                       throws java.io.IOException
Description copied from class: BaseFilter
Handle custom event associated with the Connection. This Filter may either complete the required processing and return StopAction, or delegate remaining processing to the next Filter in a FilterChain containing this Filter by returning InvokeAction.

Specified by:
handleEvent in interface Filter
Overrides:
handleEvent in class BaseFilter
Parameters:
ctx - FilterChainContext
Returns:
NextAction instruction for FilterChain, how it should continue the execution
Throws:
java.io.IOException

exceptionOccurred

public void exceptionOccurred(FilterChainContext ctx,
                              java.lang.Throwable error)
Description copied from class: BaseFilter
Notification about exception, occurred on the FilterChain

Specified by:
exceptionOccurred in interface Filter
Overrides:
exceptionOccurred in class BaseFilter
Parameters:
ctx - event processing FilterChainContext
error - error, which occurred during FilterChain execution


Copyright © 2011 Oracle Corpration. All Rights Reserved.