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

public Class DelayFilter

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

Filter which pauses protocol chain processing for a certain time.
Author
Alexey Stashok

Field Summary

Modifier and TypeField and Description
private final long
private final long

Constructor Summary

AccessConstructor and Description
public
DelayFilter(long readTimeoutMillis, long writeTimeoutMillis)

Method Summary

Modifier and TypeMethod and Description
public NextAction
handleRead(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(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.

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

Field Detail

readTimeoutMillisback to summary
private final long readTimeoutMillis
writeTimeoutMillisback to summary
private final long writeTimeoutMillis

Constructor Detail

DelayFilterback to summary
public DelayFilter(long readTimeoutMillis, long writeTimeoutMillis)

Method Detail

handleReadback to summary
public NextAction handleRead(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(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