|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.grizzly.filterchain.FilterAdapter
org.glassfish.grizzly.util.IdleTimeoutFilter
public class IdleTimeoutFilter
| Nested Class Summary | |
|---|---|
class |
IdleTimeoutFilter.TimeoutChecker
|
| Field Summary | |
|---|---|
static String |
IDLE_ATTRIBUTE_NAME
|
static Attribute<Long> |
idleAttribute
|
static long |
UNLIMITED_TIMEOUT
|
static long |
UNSET_TIMEOUT
|
| Constructor Summary | |
|---|---|
IdleTimeoutFilter(long timeout,
TimeUnit timeunit)
|
|
IdleTimeoutFilter(long timeout,
TimeUnit timeunit,
ScheduledExecutorService scheduledThreadPool)
|
|
| Method Summary | |
|---|---|
protected void |
addConnection(Connection connection)
|
protected void |
clearTimeout(Connection connection)
|
protected long |
getConnectionTimeout(Connection connection)
|
Long |
getExpirationTime(Connection connection,
TimeUnit timeunit)
|
ScheduledExecutorService |
getScheduledThreadPool()
|
long |
getTimeout(TimeUnit timeunit)
|
NextAction |
handleRead(FilterChainContext ctx,
NextAction nextAction)
Execute a unit of processing work to be performed, when channel will become available for reading. |
NextAction |
handleWrite(FilterChainContext ctx,
NextAction nextAction)
Execute a unit of processing work to be performed, when channel will become available for writing. |
void |
initialize()
|
boolean |
isHandleAccepted()
|
boolean |
isHandleConnected()
|
NextAction |
postAccept(FilterChainContext ctx,
NextAction nextAction)
Execute any cleanup activities, such as releasing resources that were acquired during the execution of Filter#handleAccept(com.sun.grizzly.FilterChainContext) method of
this Filter instance. |
NextAction |
postConnect(FilterChainContext ctx,
NextAction nextAction)
Execute any cleanup activities, such as releasing resources that were acquired during the execution of Filter#handleConnect(com.sun.grizzly.FilterChainContext) method of
this Filter instance. |
NextAction |
postRead(FilterChainContext ctx,
NextAction nextAction)
Execute any cleanup activities, such as releasing resources that were acquired during the execution of Filter#handleRead(com.sun.grizzly.FilterChainContext) method of
this Filter instance. |
NextAction |
postWrite(FilterChainContext ctx,
NextAction nextAction)
Execute any cleanup activities, such as releasing resources that were acquired during the execution of Filter#handleWrite(com.sun.grizzly.FilterChainContext) method of
this Filter instance. |
protected void |
registerChecker()
|
void |
release()
|
protected void |
resetTimeout(Connection connection)
|
protected void |
setConnectionTimeout(Connection connection,
long timeout)
|
void |
setExpirationTime(Connection connection,
long timeout,
TimeUnit timeunit)
|
void |
setHandleAccepted(boolean isHandleAccepted)
|
void |
setHandleConnected(boolean isHandleConnected)
|
void |
setScheduledThreadPool(ScheduledExecutorService scheduledThreadPool)
|
void |
setTimeout(long timeout,
TimeUnit timeunit)
|
| Methods inherited from class org.glassfish.grizzly.filterchain.FilterAdapter |
|---|
exceptionOccurred, getFilterChain, getIndex, handleAccept, handleClose, handleConnect, isIndexable, postClose, setIndex |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long UNLIMITED_TIMEOUT
public static final long UNSET_TIMEOUT
public static final String IDLE_ATTRIBUTE_NAME
public static Attribute<Long> idleAttribute
| Constructor Detail |
|---|
public IdleTimeoutFilter(long timeout,
TimeUnit timeunit)
public IdleTimeoutFilter(long timeout,
TimeUnit timeunit,
ScheduledExecutorService scheduledThreadPool)
| Method Detail |
|---|
public ScheduledExecutorService getScheduledThreadPool()
public void setScheduledThreadPool(ScheduledExecutorService scheduledThreadPool)
public long getTimeout(TimeUnit timeunit)
public void setTimeout(long timeout,
TimeUnit timeunit)
public boolean isHandleAccepted()
public void setHandleAccepted(boolean isHandleAccepted)
public boolean isHandleConnected()
public void setHandleConnected(boolean isHandleConnected)
public NextAction handleRead(FilterChainContext ctx,
NextAction nextAction)
throws IOException
FilterAdapterFilter 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.
handleRead in interface FilterhandleRead in class FilterAdapterctx - FilterChainContextnextAction - default NextAction, which Filter
could change in order to control how
FilterChain will continue the execution
NextAction instruction for FilterChain, how it
should continue the execution
IOException
public NextAction handleWrite(FilterChainContext ctx,
NextAction nextAction)
throws IOException
FilterAdapterFilter 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.
handleWrite in interface FilterhandleWrite in class FilterAdapterctx - FilterChainContextnextAction - default NextAction, which Filter
could change in order to control how
FilterChain will continue the execution
NextAction instruction for FilterChain, how it
should continue the execution
IOException
public NextAction postRead(FilterChainContext ctx,
NextAction nextAction)
throws IOException
FilterAdapterFilter#handleRead(com.sun.grizzly.FilterChainContext) method of
this Filter instance.
postRead in interface FilterpostRead in class FilterAdapterctx - FilterChainContextnextAction - default NextAction, which Filter
could change in order to control how
FilterChain will continue the execution
NextAction instruction for FilterChain, how it
should continue the execution
IOException
public NextAction postWrite(FilterChainContext ctx,
NextAction nextAction)
throws IOException
FilterAdapterFilter#handleWrite(com.sun.grizzly.FilterChainContext) method of
this Filter instance.
postWrite in interface FilterpostWrite in class FilterAdapterctx - FilterChainContextnextAction - default NextAction, which Filter
could change in order to control how
FilterChain will continue the execution
NextAction instruction for FilterChain, how it
should continue the execution
IOException
public NextAction postAccept(FilterChainContext ctx,
NextAction nextAction)
throws IOException
FilterAdapterFilter#handleAccept(com.sun.grizzly.FilterChainContext) method of
this Filter instance.
postAccept in interface FilterpostAccept in class FilterAdapterctx - FilterChainContextnextAction - default NextAction, which Filter
could change in order to control how
FilterChain will continue the execution
NextAction instruction for FilterChain, how it
should continue the execution
IOException
public NextAction postConnect(FilterChainContext ctx,
NextAction nextAction)
throws IOException
FilterAdapterFilter#handleConnect(com.sun.grizzly.FilterChainContext) method of
this Filter instance.
postConnect in interface FilterpostConnect in class FilterAdapterctx - FilterChainContextnextAction - default NextAction, which Filter
could change in order to control how
FilterChain will continue the execution
NextAction instruction for FilterChain, how it
should continue the execution
IOExceptionpublic void initialize()
public void release()
protected void registerChecker()
protected void addConnection(Connection connection)
protected void clearTimeout(Connection connection)
protected void resetTimeout(Connection connection)
protected long getConnectionTimeout(Connection connection)
protected void setConnectionTimeout(Connection connection,
long timeout)
public Long getExpirationTime(Connection connection,
TimeUnit timeunit)
public void setExpirationTime(Connection connection,
long timeout,
TimeUnit timeunit)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||