Package org.glassfish.grizzly.utils
Class LogFilter
java.lang.Object
org.glassfish.grizzly.filterchain.BaseFilter
org.glassfish.grizzly.utils.LogFilter
- All Implemented Interfaces:
Filter
Simple log
Filter
- Author:
- Alexey Stashok
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
exceptionOccurred
(FilterChainContext ctx, Throwable error) Notification about exception, occurred on theFilterChain
getLevel()
Execute a unit of processing work to be performed, when server channel has accepted the client connection.Execute a unit of processing work to be performed, when connection has been closed.Execute a unit of processing work to be performed, when channel gets connected.Execute a unit of processing work to be performed, when channel will become available for reading.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 passedFilterChain
.void
onFilterChainChanged
(FilterChain filterChain) Method is called, when theFilterChain
this Filter is part of, has been changed.void
onRemoved
(FilterChain filterChain) Method is called, when the Filter has been removed from the passedFilterChain
.Methods inherited from class org.glassfish.grizzly.filterchain.BaseFilter
createContext, handleEvent, toString
-
Constructor Details
-
LogFilter
public LogFilter() -
LogFilter
-
LogFilter
-
-
Method Details
-
getLogger
-
getLevel
-
onAdded
Description copied from class:BaseFilter
Method is called, when the Filter has been added to the passedFilterChain
.- Specified by:
onAdded
in interfaceFilter
- Overrides:
onAdded
in classBaseFilter
- Parameters:
filterChain
- theFilterChain
this Filter was added to.
-
onRemoved
Description copied from class:BaseFilter
Method is called, when the Filter has been removed from the passedFilterChain
.- Specified by:
onRemoved
in interfaceFilter
- Overrides:
onRemoved
in classBaseFilter
- Parameters:
filterChain
- theFilterChain
this Filter was removed from.
-
onFilterChainChanged
Description copied from class:BaseFilter
Method is called, when theFilterChain
this Filter is part of, has been changed.- Specified by:
onFilterChainChanged
in interfaceFilter
- Overrides:
onFilterChainChanged
in classBaseFilter
- Parameters:
filterChain
- theFilterChain
.
-
handleRead
Description copied from class:BaseFilter
Execute a unit of processing work to be performed, when channel will become available for reading. ThisFilter
may either complete the required processing and return false, or delegate remaining processing to the nextFilter
in aFilterChain
containing thisFilter
by returning true.- Specified by:
handleRead
in interfaceFilter
- Overrides:
handleRead
in classBaseFilter
- Parameters:
ctx
-FilterChainContext
- Returns:
NextAction
instruction forFilterChain
, how it should continue the execution- Throws:
IOException
-
handleWrite
Description copied from class:BaseFilter
Execute a unit of processing work to be performed, when some data should be written on channel. ThisFilter
may either complete the required processing and return false, or delegate remaining processing to the nextFilter
in aFilterChain
containing thisFilter
by returning true.- Specified by:
handleWrite
in interfaceFilter
- Overrides:
handleWrite
in classBaseFilter
- Parameters:
ctx
-FilterChainContext
- Returns:
NextAction
instruction forFilterChain
, how it should continue the execution- Throws:
IOException
-
handleConnect
Description copied from class:BaseFilter
Execute a unit of processing work to be performed, when channel gets connected. ThisFilter
may either complete the required processing and return false, or delegate remaining processing to the nextFilter
in aFilterChain
containing thisFilter
by returning true.- Specified by:
handleConnect
in interfaceFilter
- Overrides:
handleConnect
in classBaseFilter
- Parameters:
ctx
-FilterChainContext
- Returns:
NextAction
instruction forFilterChain
, how it should continue the execution- Throws:
IOException
-
handleAccept
Description copied from class:BaseFilter
Execute a unit of processing work to be performed, when server channel has accepted the client connection. ThisFilter
may either complete the required processing and return false, or delegate remaining processing to the nextFilter
in aFilterChain
containing thisFilter
by returning true.- Specified by:
handleAccept
in interfaceFilter
- Overrides:
handleAccept
in classBaseFilter
- Parameters:
ctx
-FilterChainContext
- Returns:
NextAction
instruction forFilterChain
, how it should continue the execution- Throws:
IOException
-
handleClose
Description copied from class:BaseFilter
Execute a unit of processing work to be performed, when connection has been closed. ThisFilter
may either complete the required processing and return false, or delegate remaining processing to the nextFilter
in aFilterChain
containing thisFilter
by returning true.- Specified by:
handleClose
in interfaceFilter
- Overrides:
handleClose
in classBaseFilter
- Parameters:
ctx
-FilterChainContext
- Returns:
NextAction
instruction forFilterChain
, how it should continue the execution- Throws:
IOException
-
exceptionOccurred
Description copied from class:BaseFilter
Notification about exception, occurred on theFilterChain
- Specified by:
exceptionOccurred
in interfaceFilter
- Overrides:
exceptionOccurred
in classBaseFilter
- Parameters:
ctx
- event processingFilterChainContext
error
- error, which occurred during FilterChain execution
-