Top Description Fields Constructors Methods
org.glassfish.grizzly.portunif

public Class BackChannelFilter

extends BaseFilter
Class Inheritance
Imports
java.io.IOException, org.glassfish.grizzly.ReadResult, org.glassfish.grizzly.filterchain.BaseFilter, .FilterChain, .FilterChainContext, .FilterChainContext.TransportContext, .FilterChainEvent, .NextAction

The org.glassfish.grizzly.filterchain.Filter, which is responsible to connect custom protocol FilterChain with main FilterChain. Usually this org.glassfish.grizzly.filterchain.Filter is getting added to the custom protocol FilterChain as first org.glassfish.grizzly.filterchain.Filter.
Author
Alexey Stashok

Field Summary

Modifier and TypeField and Description
private final PUFilter

Constructor Summary

AccessConstructor and Description
pack-priv
BackChannelFilter(final PUFilter puFilter)

Method Summary

Modifier and TypeMethod and Description
public void
public NextAction
public NextAction
handleRead(final FilterChainContext ctx)

Overrides org.glassfish.grizzly.filterchain.BaseFilter.handleRead.

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(final FilterChainContext ctx)

Overrides org.glassfish.grizzly.filterchain.BaseFilter.handleWrite.

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

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

private static boolean
private boolean
isFilterChainRead(final FilterChainContext ctx)

Methods returns true, if handleRead(org.glassfish.grizzly.filterchain.FilterChainContext) is called because user explicitly initiated FilterChain by calling FilterChainContext#read() or FilterChain#read(org.glassfish.grizzly.filterchain.FilterChainContext); otherwise false is returned.

Inherited from org.glassfish.grizzly.filterchain.BaseFilter:
createContexthandleAccepthandleClosehandleConnectonAddedonFilterChainChangedonRemovedtoString

Field Detail

puFilterback to summary
private final PUFilter puFilter

Constructor Detail

BackChannelFilterback to summary
pack-priv BackChannelFilter(final PUFilter puFilter)

Method Detail

exceptionOccurredback to summary
public void exceptionOccurred(final FilterChainContext ctx, final Throwable error)

Overrides org.glassfish.grizzly.filterchain.BaseFilter.exceptionOccurred.

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

Doc from org.glassfish.grizzly.filterchain.BaseFilter.exceptionOccurred.

Notification about exception, occurred on the FilterChain

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

Overrides org.glassfish.grizzly.filterchain.BaseFilter.handleEvent.

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

Doc from org.glassfish.grizzly.filterchain.BaseFilter.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(final FilterChainContext ctx) throws IOException

Overrides org.glassfish.grizzly.filterchain.BaseFilter.handleRead.

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

Doc from org.glassfish.grizzly.filterchain.BaseFilter.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(final FilterChainContext ctx) throws IOException

Overrides org.glassfish.grizzly.filterchain.BaseFilter.handleWrite.

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

Doc from org.glassfish.grizzly.filterchain.BaseFilter.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
@SuppressWarnings:unchecked
isDownstreamback to summary
private static boolean isDownstream(final FilterChainContext context)
isFilterChainReadback to summary
private boolean isFilterChainRead(final FilterChainContext ctx)

Methods returns true, if handleRead(org.glassfish.grizzly.filterchain.FilterChainContext) is called because user explicitly initiated FilterChain by calling FilterChainContext#read() or FilterChain#read(org.glassfish.grizzly.filterchain.FilterChainContext); otherwise false is returned.