Top Description Constructors Methods
org.glassfish.grizzly.filterchain

public Class BaseFilter

extends Object
implements Filter
Class Inheritance
All Implemented Interfaces
org.glassfish.grizzly.filterchain.Filter
Known Direct Subclasses
org.glassfish.grizzly.filterchain.TransportFilter, org.glassfish.grizzly.nio.transport.TCPNIOTransportFilter, org.glassfish.grizzly.nio.transport.UDPNIOTransportFilter, org.glassfish.grizzly.ssl.SSLBaseFilter, org.glassfish.grizzly.utils.ActivityCheckFilter, org.glassfish.grizzly.utils.DelayFilter, org.glassfish.grizzly.utils.EchoFilter, org.glassfish.grizzly.utils.IdleTimeoutFilter, org.glassfish.grizzly.utils.LogFilter, org.glassfish.grizzly.utils.SilentConnectionFilter, org.glassfish.grizzly.compression.lzma.LZMAFilter, org.glassfish.grizzly.compression.zip.GZipFilter, org.glassfish.grizzly.filterchain.AbstractCodecFilter
Imports
java.io.IOException, org.glassfish.grizzly.Connection, org.glassfish.grizzly.filterchain.FilterChainContext.Operation

Provides empty implementation for Filter processing methods.
Author
Alexey Stashok
See Also
Filter

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public FilterChainContext
createContext(final Connection<L> connection, final FilterChainContext.Operation operation)

public void
exceptionOccurred(FilterChainContext
event processing FilterChainContext
ctx
,
Throwable
error, which occurred during FilterChain execution
error
)

Implements org.glassfish.grizzly.filterchain.Filter.exceptionOccurred.

Notification about exception, occurred on the FilterChain

public NextAction
handleAccept(FilterChainContext ctx)

Implements org.glassfish.grizzly.filterchain.Filter.handleAccept.

Execute a unit of processing work to be performed, when server channel has accepted the client connection.

public NextAction
handleClose(FilterChainContext ctx)

Implements org.glassfish.grizzly.filterchain.Filter.handleClose.

Execute a unit of processing work to be performed, when connection has been closed.

public NextAction
handleConnect(FilterChainContext ctx)

Implements org.glassfish.grizzly.filterchain.Filter.handleConnect.

Execute a unit of processing work to be performed, when channel gets connected.

public NextAction
handleEvent(final FilterChainContext ctx, final FilterChainEvent event)

Implements org.glassfish.grizzly.filterchain.Filter.handleEvent.

Handle custom event associated with the Connection.

public NextAction
handleRead(FilterChainContext ctx)

Implements org.glassfish.grizzly.filterchain.Filter.handleRead.

Execute a unit of processing work to be performed, when channel will become available for reading.

public NextAction
handleWrite(FilterChainContext ctx)

Implements org.glassfish.grizzly.filterchain.Filter.handleWrite.

Execute a unit of processing work to be performed, when some data should be written on channel.

public void
onAdded(FilterChain filterChain)

Implements org.glassfish.grizzly.filterchain.Filter.onAdded.

Method is called, when the Filter has been added to the passed FilterChain.

public void
onFilterChainChanged(FilterChain filterChain)

Implements org.glassfish.grizzly.filterchain.Filter.onFilterChainChanged.

Method is called, when the FilterChain this Filter is part of, has been changed.

public void
onRemoved(FilterChain filterChain)

Implements org.glassfish.grizzly.filterchain.Filter.onRemoved.

Method is called, when the Filter has been removed from the passed FilterChain.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Constructor Detail

BaseFilterback to summary
public BaseFilter()

Method Detail

createContextback to summary
public FilterChainContext createContext(final Connection<L> connection, final FilterChainContext.Operation operation)
exceptionOccurredback to summary
public void exceptionOccurred(FilterChainContext ctx, Throwable error)

Implements org.glassfish.grizzly.filterchain.Filter.exceptionOccurred.

Notification about exception, occurred on the FilterChain

Parameters
ctx:FilterChainContext

event processing FilterChainContext

error:Throwable

error, which occurred during FilterChain execution

Annotations
@Override
handleAcceptback to summary
public NextAction handleAccept(FilterChainContext ctx) throws IOException

Implements org.glassfish.grizzly.filterchain.Filter.handleAccept.

Doc from org.glassfish.grizzly.filterchain.Filter.handleAccept.

Execute a unit of processing work to be performed, when server channel has accepted the client connection. 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.

Annotations
@Override
handleCloseback to summary
public NextAction handleClose(FilterChainContext ctx) throws IOException

Implements org.glassfish.grizzly.filterchain.Filter.handleClose.

Doc from org.glassfish.grizzly.filterchain.Filter.handleClose.

Execute a unit of processing work to be performed, when connection has been closed. 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.

Annotations
@Override
handleConnectback to summary
public NextAction handleConnect(FilterChainContext ctx) throws IOException

Implements org.glassfish.grizzly.filterchain.Filter.handleConnect.

Doc from org.glassfish.grizzly.filterchain.Filter.handleConnect.

Execute a unit of processing work to be performed, when channel gets connected. 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.

Annotations
@Override
handleEventback to summary
public NextAction handleEvent(final FilterChainContext ctx, final FilterChainEvent event) throws IOException

Implements org.glassfish.grizzly.filterchain.Filter.handleEvent.

Doc from org.glassfish.grizzly.filterchain.Filter.handleEvent.

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.

Annotations
@Override
handleReadback to summary
public NextAction handleRead(FilterChainContext ctx) throws IOException

Implements org.glassfish.grizzly.filterchain.Filter.handleRead.

Doc from org.glassfish.grizzly.filterchain.Filter.handleRead.

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.

Annotations
@Override
handleWriteback to summary
public NextAction handleWrite(FilterChainContext ctx) throws IOException

Implements org.glassfish.grizzly.filterchain.Filter.handleWrite.

Doc from org.glassfish.grizzly.filterchain.Filter.handleWrite.

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.

Annotations
@Override
onAddedback to summary
public void onAdded(FilterChain filterChain)

Implements org.glassfish.grizzly.filterchain.Filter.onAdded.

Doc from org.glassfish.grizzly.filterchain.Filter.onAdded.

Method is called, when the Filter has been added to the passed FilterChain.

Annotations
@Override
onFilterChainChangedback to summary
public void onFilterChainChanged(FilterChain filterChain)

Implements org.glassfish.grizzly.filterchain.Filter.onFilterChainChanged.

Doc from org.glassfish.grizzly.filterchain.Filter.onFilterChainChanged.

Method is called, when the FilterChain this Filter is part of, has been changed.

Annotations
@Override
onRemovedback to summary
public void onRemoved(FilterChain filterChain)

Implements org.glassfish.grizzly.filterchain.Filter.onRemoved.

Doc from org.glassfish.grizzly.filterchain.Filter.onRemoved.

Method is called, when the Filter has been removed from the passed FilterChain.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override