public class LogFilter extends BaseFilter
Filter
Constructor and Description |
---|
LogFilter() |
LogFilter(Logger logger) |
LogFilter(Logger logger,
Level level) |
Modifier and Type | Method and Description |
---|---|
void |
exceptionOccurred(FilterChainContext ctx,
Throwable error)
Notification about exception, occurred on the
FilterChain |
Level |
getLevel() |
Logger |
getLogger() |
NextAction |
handleAccept(FilterChainContext ctx)
Execute a unit of processing work to be performed, when server channel
has accepted the client connection.
|
NextAction |
handleClose(FilterChainContext ctx)
Execute a unit of processing work to be performed, when connection
has been closed.
|
NextAction |
handleConnect(FilterChainContext ctx)
Execute a unit of processing work to be performed, when channel gets
connected.
|
NextAction |
handleRead(FilterChainContext ctx)
Execute a unit of processing work to be performed, when channel will
become available for reading.
|
NextAction |
handleWrite(FilterChainContext ctx)
Execute a unit of processing work to be performed, when some data should
be written on channel.
|
void |
onAdded(FilterChain filterChain)
Method is called, when the Filter has been added to the
passed
FilterChain . |
void |
onFilterChainChanged(FilterChain filterChain)
Method is called, when the
FilterChain this Filter is part of,
has been changed. |
void |
onRemoved(FilterChain filterChain)
Method is called, when the Filter has been removed from the
passed
FilterChain . |
createContext, handleEvent
public LogFilter()
public LogFilter(Logger logger)
public Logger getLogger()
public Level getLevel()
public void onAdded(FilterChain filterChain)
BaseFilter
FilterChain
.onAdded
in interface Filter
onAdded
in class BaseFilter
filterChain
- the FilterChain
this Filter was added to.public void onRemoved(FilterChain filterChain)
BaseFilter
FilterChain
.onRemoved
in interface Filter
onRemoved
in class BaseFilter
filterChain
- the FilterChain
this Filter was removed from.public void onFilterChainChanged(FilterChain filterChain)
BaseFilter
FilterChain
this Filter is part of,
has been changed.onFilterChainChanged
in interface Filter
onFilterChainChanged
in class BaseFilter
filterChain
- the FilterChain
.public NextAction handleRead(FilterChainContext ctx) throws IOException
BaseFilter
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 Filter
handleRead
in class BaseFilter
ctx
- FilterChainContext
NextAction
instruction for FilterChain
, how it
should continue the executionIOException
public NextAction handleWrite(FilterChainContext ctx) throws IOException
BaseFilter
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 Filter
handleWrite
in class BaseFilter
ctx
- FilterChainContext
NextAction
instruction for FilterChain
, how it
should continue the executionIOException
public NextAction handleConnect(FilterChainContext ctx) throws IOException
BaseFilter
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 Filter
handleConnect
in class BaseFilter
ctx
- FilterChainContext
NextAction
instruction for FilterChain
, how it
should continue the executionIOException
public NextAction handleAccept(FilterChainContext ctx) throws IOException
BaseFilter
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 Filter
handleAccept
in class BaseFilter
ctx
- FilterChainContext
NextAction
instruction for FilterChain
, how it
should continue the executionIOException
public NextAction handleClose(FilterChainContext ctx) throws IOException
BaseFilter
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 Filter
handleClose
in class BaseFilter
ctx
- FilterChainContext
NextAction
instruction for FilterChain
, how it
should continue the executionIOException
public void exceptionOccurred(FilterChainContext ctx, Throwable error)
BaseFilter
FilterChain
exceptionOccurred
in interface Filter
exceptionOccurred
in class BaseFilter
ctx
- event processing FilterChainContext
error
- error, which occurred during FilterChain executionCopyright © 2014 Oracle Corporation. All rights reserved.