Top Description Fields Constructors Methods
org.glassfish.grizzly.utils

public Class LogFilter

extends BaseFilter
Class Inheritance
Imports
java.io.IOException, java.util.logging.Level, .Logger, org.glassfish.grizzly.Grizzly, org.glassfish.grizzly.filterchain.BaseFilter, .Filter, .FilterChain, .FilterChainContext, .NextAction

Simple log Filter
Author
Alexey Stashok

Field Summary

Modifier and TypeField and Description
private final Level
private final Logger

Constructor Summary

AccessConstructor and Description
public
public
LogFilter(Logger logger)

public
LogFilter(Logger logger, Level level)

Method Summary

Modifier and TypeMethod and Description
public void
public Level
public Logger
public NextAction
handleAccept(FilterChainContext ctx)

Overrides org.glassfish.grizzly.filterchain.BaseFilter.handleAccept.

Implements org.glassfish.grizzly.filterchain.Filter.handleAccept.

Execute a unit of processing work to be performed, when server channel has accepted the client connection.

public NextAction
handleClose(FilterChainContext ctx)

Overrides org.glassfish.grizzly.filterchain.BaseFilter.handleClose.

Implements org.glassfish.grizzly.filterchain.Filter.handleClose.

Execute a unit of processing work to be performed, when connection has been closed.

public NextAction
handleConnect(FilterChainContext ctx)

Overrides org.glassfish.grizzly.filterchain.BaseFilter.handleConnect.

Implements org.glassfish.grizzly.filterchain.Filter.handleConnect.

Execute a unit of processing work to be performed, when channel gets connected.

public NextAction
handleRead(FilterChainContext ctx)

Overrides org.glassfish.grizzly.filterchain.BaseFilter.handleRead.

Implements org.glassfish.grizzly.filterchain.Filter.handleRead.

Execute a unit of processing work to be performed, when channel will become available for reading.

public NextAction
handleWrite(FilterChainContext ctx)

Overrides org.glassfish.grizzly.filterchain.BaseFilter.handleWrite.

Implements org.glassfish.grizzly.filterchain.Filter.handleWrite.

Execute a unit of processing work to be performed, when some data should be written on channel.

public void
onAdded(FilterChain filterChain)

Overrides org.glassfish.grizzly.filterchain.BaseFilter.onAdded.

Implements org.glassfish.grizzly.filterchain.Filter.onAdded.

Method is called, when the Filter has been added to the passed FilterChain.

public void
public void
onRemoved(FilterChain filterChain)

Overrides org.glassfish.grizzly.filterchain.BaseFilter.onRemoved.

Implements org.glassfish.grizzly.filterchain.Filter.onRemoved.

Method is called, when the Filter has been removed from the passed FilterChain.

Inherited from org.glassfish.grizzly.filterchain.BaseFilter:
createContexthandleEventtoString

Field Detail

levelback to summary
private final Level level
loggerback to summary
private final Logger logger

Constructor Detail

LogFilterback to summary
public LogFilter()
LogFilterback to summary
public LogFilter(Logger logger)
LogFilterback to summary
public LogFilter(Logger logger, Level level)

Method Detail

exceptionOccurredback to summary
public void exceptionOccurred(FilterChainContext ctx, Throwable error)

Overrides org.glassfish.grizzly.filterchain.BaseFilter.exceptionOccurred.

Implements org.glassfish.grizzly.filterchain.Filter.exceptionOccurred.

Doc from org.glassfish.grizzly.filterchain.BaseFilter.exceptionOccurred.

Notification about exception, occurred on the FilterChain

Annotations
@Override
getLevelback to summary
public Level getLevel()
getLoggerback to summary
public Logger getLogger()
handleAcceptback to summary
public NextAction handleAccept(FilterChainContext ctx) throws IOException

Overrides org.glassfish.grizzly.filterchain.BaseFilter.handleAccept.

Implements org.glassfish.grizzly.filterchain.Filter.handleAccept.

Doc from org.glassfish.grizzly.filterchain.BaseFilter.handleAccept.

Execute a unit of processing work to be performed, when server channel has accepted the client connection. This 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.

Annotations
@Override
handleCloseback to summary
public NextAction handleClose(FilterChainContext ctx) throws IOException

Overrides org.glassfish.grizzly.filterchain.BaseFilter.handleClose.

Implements org.glassfish.grizzly.filterchain.Filter.handleClose.

Doc from org.glassfish.grizzly.filterchain.BaseFilter.handleClose.

Execute a unit of processing work to be performed, when connection has been closed. This 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.

Annotations
@Override
handleConnectback to summary
public NextAction handleConnect(FilterChainContext ctx) throws IOException

Overrides org.glassfish.grizzly.filterchain.BaseFilter.handleConnect.

Implements org.glassfish.grizzly.filterchain.Filter.handleConnect.

Doc from org.glassfish.grizzly.filterchain.BaseFilter.handleConnect.

Execute a unit of processing work to be performed, when channel gets connected. This 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.

Annotations
@Override
handleReadback to summary
public NextAction handleRead(FilterChainContext ctx) throws IOException

Overrides org.glassfish.grizzly.filterchain.BaseFilter.handleRead.

Implements org.glassfish.grizzly.filterchain.Filter.handleRead.

Doc from org.glassfish.grizzly.filterchain.BaseFilter.handleRead.

Execute a unit of processing work to be performed, when channel will become available for reading. This 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.

Annotations
@Override
handleWriteback to summary
public NextAction handleWrite(FilterChainContext ctx) throws IOException

Overrides org.glassfish.grizzly.filterchain.BaseFilter.handleWrite.

Implements org.glassfish.grizzly.filterchain.Filter.handleWrite.

Doc from org.glassfish.grizzly.filterchain.BaseFilter.handleWrite.

Execute a unit of processing work to be performed, when some data should be written on channel. This 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.

Annotations
@Override
onAddedback to summary
public void onAdded(FilterChain filterChain)

Overrides org.glassfish.grizzly.filterchain.BaseFilter.onAdded.

Implements org.glassfish.grizzly.filterchain.Filter.onAdded.

Doc from org.glassfish.grizzly.filterchain.BaseFilter.onAdded.

Method is called, when the Filter has been added to the passed FilterChain.

Annotations
@Override
onFilterChainChangedback to summary
public void onFilterChainChanged(FilterChain filterChain)

Overrides org.glassfish.grizzly.filterchain.BaseFilter.onFilterChainChanged.

Implements org.glassfish.grizzly.filterchain.Filter.onFilterChainChanged.

Doc from org.glassfish.grizzly.filterchain.BaseFilter.onFilterChainChanged.

Method is called, when the FilterChain this Filter is part of, has been changed.

Annotations
@Override
onRemovedback to summary
public void onRemoved(FilterChain filterChain)

Overrides org.glassfish.grizzly.filterchain.BaseFilter.onRemoved.

Implements org.glassfish.grizzly.filterchain.Filter.onRemoved.

Doc from org.glassfish.grizzly.filterchain.BaseFilter.onRemoved.

Method is called, when the Filter has been removed from the passed FilterChain.

Annotations
@Override