|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.grizzly.util.LogFilter
public class LogFilter
Simple log Filter
| Constructor Summary | |
|---|---|
LogFilter()
|
|
LogFilter(Logger logger)
|
|
LogFilter(Logger logger,
Level level)
|
|
| Method Summary | |
|---|---|
TransformationResult |
decode(Connection connection,
Object originalMessage)
|
TransformationResult |
encode(Connection connection,
Object originalMessage)
|
void |
exceptionOccurred(FilterChainContext ctx,
Throwable error)
Notification about exception, occured on the FilterChain |
int |
getIndex()
Gets the Filter index. |
Level |
getLevel()
|
Logger |
getLogger()
|
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. |
void |
setLevel(Level level)
|
void |
setLogger(Logger logger)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LogFilter()
public LogFilter(Logger logger)
public LogFilter(Logger logger,
Level level)
| Method Detail |
|---|
public Logger getLogger()
public void setLogger(Logger logger)
public Level getLevel()
public void setLevel(Level level)
public NextAction handleRead(FilterChainContext ctx,
NextAction nextAction)
throws IOException
FilterFilter 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
IOException
public NextAction postRead(FilterChainContext ctx,
NextAction nextAction)
throws IOException
FilterFilter#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
IOException
public NextAction handleWrite(FilterChainContext ctx,
NextAction nextAction)
throws IOException
FilterFilter 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
IOException
public NextAction postWrite(FilterChainContext ctx,
NextAction nextAction)
throws IOException
FilterFilter#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
IOException
public NextAction handleConnect(FilterChainContext ctx,
NextAction nextAction)
throws IOException
FilterFilter 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
IOException
public NextAction postConnect(FilterChainContext ctx,
NextAction nextAction)
throws IOException
FilterFilter#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
IOException
public NextAction handleAccept(FilterChainContext ctx,
NextAction nextAction)
throws IOException
FilterFilter 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
IOException
public NextAction postAccept(FilterChainContext ctx,
NextAction nextAction)
throws IOException
FilterFilter#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
IOException
public NextAction handleClose(FilterChainContext ctx,
NextAction nextAction)
throws IOException
FilterFilter 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
IOException
public NextAction postClose(FilterChainContext ctx,
NextAction nextAction)
throws IOException
FilterFilter#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
IOException
public void exceptionOccurred(FilterChainContext ctx,
Throwable error)
FilterFilterChain
exceptionOccurred in interface Filterctx - event processing FilterChainContexterror - error, which occurred during FilterChain execution
public TransformationResult decode(Connection connection,
Object originalMessage)
throws TransformationException
TransformationException
public TransformationResult encode(Connection connection,
Object originalMessage)
throws TransformationException
TransformationExceptionpublic boolean isIndexable()
FilterFilter 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()
FilterFilter index.
getIndex in interface FilterFilter index.public void setIndex(int index)
FilterFilter index.
setIndex in interface Filterindex - the Filter index.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||