|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.grizzly.filterchain.FilterAdapter
public class FilterAdapter
Provides empty implementation for Filter processing methods.
Filter| Constructor Summary | |
|---|---|
FilterAdapter()
|
|
| Method Summary | |
|---|---|
void |
exceptionOccurred(FilterChainContext ctx,
Throwable error)
Notification about exception, occured on the FilterChain |
FilterChain |
getFilterChain(Context ctx)
Returns the FilterChain, which is executing this Filter
on the current thread. |
int |
getIndex()
Gets the Filter index. |
NextAction |
handleAccept(FilterChainContext ctx,
NextAction nextAction)
Execute a unit of processing work to be performed, when server channel has accepted the client connection. |
NextAction |
handleClose(FilterChainContext ctx,
NextAction nextAction)
Execute a unit of processing work to be performed, when connection has been closed. |
NextAction |
handleConnect(FilterChainContext ctx,
NextAction nextAction)
Execute a unit of processing work to be performed, when channel gets connected. |
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. |
boolean |
isIndexable()
Defines if this Filter could be indexed by a FilterChain
in order to find neighbour Filters faster. |
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 |
postClose(FilterChainContext ctx,
NextAction nextAction)
Execute any cleanup activities, such as releasing resources that were acquired during the execution of Filter#handleClose(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. |
void |
setIndex(int index)
Sets the Filter index. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FilterAdapter()
| Method Detail |
|---|
public NextAction handleRead(FilterChainContext ctx,
NextAction nextAction)
throws IOException
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.
handleRead in interface Filterctx - 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
{@link - java.io.IOException}
IOException
public NextAction postRead(FilterChainContext ctx,
NextAction nextAction)
throws IOException
Filter#handleRead(com.sun.grizzly.FilterChainContext) method of
this Filter instance.
postRead in interface Filterctx - 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
{@link - java.io.IOException}
IOException
public NextAction handleWrite(FilterChainContext ctx,
NextAction nextAction)
throws IOException
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.
handleWrite in interface Filterctx - 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
{@link - java.io.IOException}
IOException
public NextAction postWrite(FilterChainContext ctx,
NextAction nextAction)
throws IOException
Filter#handleWrite(com.sun.grizzly.FilterChainContext) method of
this Filter instance.
postWrite in interface Filterctx - 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
{@link - java.io.IOException}
IOException
public NextAction handleConnect(FilterChainContext ctx,
NextAction nextAction)
throws IOException
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.
handleConnect in interface Filterctx - 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
{@link - java.io.IOException}
IOException
public NextAction postConnect(FilterChainContext ctx,
NextAction nextAction)
throws IOException
Filter#handleConnect(com.sun.grizzly.FilterChainContext) method of
this Filter instance.
postConnect in interface Filterctx - 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
{@link - java.io.IOException}
IOException
public NextAction handleAccept(FilterChainContext ctx,
NextAction nextAction)
throws IOException
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.
handleAccept in interface Filterctx - 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
{@link - java.io.IOException}
IOException
public NextAction postAccept(FilterChainContext ctx,
NextAction nextAction)
throws IOException
Filter#handleAccept(com.sun.grizzly.FilterChainContext) method of
this Filter instance.
postAccept in interface Filterctx - 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
{@link - java.io.IOException}
IOException
public NextAction handleClose(FilterChainContext ctx,
NextAction nextAction)
throws IOException
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.
handleClose in interface Filterctx - 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
{@link - java.io.IOException}
IOException
public NextAction postClose(FilterChainContext ctx,
NextAction nextAction)
throws IOException
Filter#handleClose(com.sun.grizzly.FilterChainContext) method of
this Filter instance.
postClose in interface Filterctx - 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
{@link - java.io.IOException}
IOException
public void exceptionOccurred(FilterChainContext ctx,
Throwable error)
FilterChain
exceptionOccurred in interface Filterctx - event processing FilterChainContexterror - error, which occurred during FilterChain executionpublic FilterChain getFilterChain(Context ctx)
FilterChain, which is executing this Filter
on the current thread. Because Filter could be shared among
several FilterChain - we need IOEventContext to get
the FilterChain, which is running this Filter
ctx - the execution IOEventContext
FilterChain, which is currently
executing this Filterpublic boolean isIndexable()
Filter could be indexed by a FilterChain
in order to find neighbour Filters faster.
Most of the time it's very desired for a Filters to be indexable,
but there are cases, when it's not appropriate, for example if single
Filter instance should be shared among several
FilterChains.
isIndexable in interface FilterFilter is indexable, or false otherwise.public int getIndex()
Filter index.
getIndex in interface FilterFilter index.public void setIndex(int index)
Filter index.
setIndex in interface Filterindex - the Filter index.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||