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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexceptionOccurred(FilterChainContext ctx, Throwable error) Notification about exception, occurred on theFilterChaingetLevel()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.voidonAdded(FilterChain filterChain) Method is called, when the Filter has been added to the passedFilterChain.voidonFilterChainChanged(FilterChain filterChain) Method is called, when theFilterChainthis Filter is part of, has been changed.voidonRemoved(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:BaseFilterMethod is called, when the Filter has been added to the passedFilterChain.- Specified by:
onAddedin interfaceFilter- Overrides:
onAddedin classBaseFilter- Parameters:
filterChain- theFilterChainthis Filter was added to.
-
onRemoved
Description copied from class:BaseFilterMethod is called, when the Filter has been removed from the passedFilterChain.- Specified by:
onRemovedin interfaceFilter- Overrides:
onRemovedin classBaseFilter- Parameters:
filterChain- theFilterChainthis Filter was removed from.
-
onFilterChainChanged
Description copied from class:BaseFilterMethod is called, when theFilterChainthis Filter is part of, has been changed.- Specified by:
onFilterChainChangedin interfaceFilter- Overrides:
onFilterChainChangedin classBaseFilter- Parameters:
filterChain- theFilterChain.
-
handleRead
Description copied from class:BaseFilterExecute a unit of processing work to be performed, when channel will become available for reading. ThisFiltermay either complete the required processing and return false, or delegate remaining processing to the nextFilterin aFilterChaincontaining thisFilterby returning true.- Specified by:
handleReadin interfaceFilter- Overrides:
handleReadin classBaseFilter- Parameters:
ctx-FilterChainContext- Returns:
NextActioninstruction forFilterChain, how it should continue the execution- Throws:
IOException
-
handleWrite
Description copied from class:BaseFilterExecute a unit of processing work to be performed, when some data should be written on channel. ThisFiltermay either complete the required processing and return false, or delegate remaining processing to the nextFilterin aFilterChaincontaining thisFilterby returning true.- Specified by:
handleWritein interfaceFilter- Overrides:
handleWritein classBaseFilter- Parameters:
ctx-FilterChainContext- Returns:
NextActioninstruction forFilterChain, how it should continue the execution- Throws:
IOException
-
handleConnect
Description copied from class:BaseFilterExecute a unit of processing work to be performed, when channel gets connected. ThisFiltermay either complete the required processing and return false, or delegate remaining processing to the nextFilterin aFilterChaincontaining thisFilterby returning true.- Specified by:
handleConnectin interfaceFilter- Overrides:
handleConnectin classBaseFilter- Parameters:
ctx-FilterChainContext- Returns:
NextActioninstruction forFilterChain, how it should continue the execution- Throws:
IOException
-
handleAccept
Description copied from class:BaseFilterExecute a unit of processing work to be performed, when server channel has accepted the client connection. ThisFiltermay either complete the required processing and return false, or delegate remaining processing to the nextFilterin aFilterChaincontaining thisFilterby returning true.- Specified by:
handleAcceptin interfaceFilter- Overrides:
handleAcceptin classBaseFilter- Parameters:
ctx-FilterChainContext- Returns:
NextActioninstruction forFilterChain, how it should continue the execution- Throws:
IOException
-
handleClose
Description copied from class:BaseFilterExecute a unit of processing work to be performed, when connection has been closed. ThisFiltermay either complete the required processing and return false, or delegate remaining processing to the nextFilterin aFilterChaincontaining thisFilterby returning true.- Specified by:
handleClosein interfaceFilter- Overrides:
handleClosein classBaseFilter- Parameters:
ctx-FilterChainContext- Returns:
NextActioninstruction forFilterChain, how it should continue the execution- Throws:
IOException
-
exceptionOccurred
Description copied from class:BaseFilterNotification about exception, occurred on theFilterChain- Specified by:
exceptionOccurredin interfaceFilter- Overrides:
exceptionOccurredin classBaseFilter- Parameters:
ctx- event processingFilterChainContexterror- error, which occurred during FilterChain execution
-