org.glassfish.grizzly.utils
Class IdleTimeoutFilter
java.lang.Object
org.glassfish.grizzly.filterchain.BaseFilter
org.glassfish.grizzly.utils.IdleTimeoutFilter
- All Implemented Interfaces:
- Filter
public class IdleTimeoutFilter
- extends BaseFilter
- Author:
- oleksiys
FOREVER
public static final Long FOREVER
FOREVER_SPECIAL
public static final Long FOREVER_SPECIAL
IDLE_ATTRIBUTE_NAME
public static final String IDLE_ATTRIBUTE_NAME
- See Also:
- Constant Field Values
IdleTimeoutFilter
public IdleTimeoutFilter(long timeout,
TimeUnit timeunit)
IdleTimeoutFilter
public IdleTimeoutFilter(DelayedExecutor executor,
long timeout,
TimeUnit timeunit)
IdleTimeoutFilter
protected IdleTimeoutFilter(DelayedExecutor executor,
boolean needStartExecutor,
long timeout,
TimeUnit timeunit)
getTimeout
public long getTimeout(TimeUnit timeunit)
handleAccept
public NextAction handleAccept(FilterChainContext ctx)
throws IOException
- Description copied from class:
BaseFilter
- 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.
- Specified by:
handleAccept in interface Filter- Overrides:
handleAccept in class BaseFilter
- Parameters:
ctx - FilterChainContext
- Returns:
NextAction instruction for FilterChain, how it
should continue the execution
- Throws:
IOException
handleConnect
public NextAction handleConnect(FilterChainContext ctx)
throws IOException
- Description copied from class:
BaseFilter
- 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.
- Specified by:
handleConnect in interface Filter- Overrides:
handleConnect in class BaseFilter
- Parameters:
ctx - FilterChainContext
- Returns:
NextAction instruction for FilterChain, how it
should continue the execution
- Throws:
IOException
handleRead
public NextAction handleRead(FilterChainContext ctx)
throws 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:
IOException
handleWrite
public NextAction handleWrite(FilterChainContext ctx)
throws 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:
IOException
handleClose
public NextAction handleClose(FilterChainContext ctx)
throws IOException
- Description copied from class:
BaseFilter
- 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.
- Specified by:
handleClose in interface Filter- Overrides:
handleClose in class BaseFilter
- Parameters:
ctx - FilterChainContext
- Returns:
NextAction instruction for FilterChain, how it
should continue the execution
- Throws:
IOException
queueAction
protected void queueAction(FilterChainContext ctx)
finalize
protected void finalize()
throws Throwable
- Overrides:
finalize in class Object
- Throws:
Throwable
Copyright © 2011 Oracle Corpration. All Rights Reserved.