|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.netty.handler.logging.LoggingHandler
@ChannelHandler.Sharable public class LoggingHandler
A ChannelHandler that logs all events via InternalLogger.
By default, all events are logged at DEBUG level. You can extend
this class and override log(ChannelEvent) to change the default
behavior.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler |
|---|
ChannelHandler.Sharable |
| Constructor Summary | |
|---|---|
LoggingHandler()
Creates a new instance whose logger name is the fully qualified class name of the instance with hex dump enabled. |
|
LoggingHandler(boolean hexDump)
Creates a new instance whose logger name is the fully qualified class name of the instance. |
|
LoggingHandler(java.lang.Class<?> clazz)
Creates a new instance with the specified logger name and with hex dump enabled. |
|
LoggingHandler(java.lang.Class<?> clazz,
boolean hexDump)
Creates a new instance with the specified logger name. |
|
LoggingHandler(java.lang.Class<?> clazz,
InternalLogLevel level)
Creates a new instance with the specified logger name. |
|
LoggingHandler(java.lang.Class<?> clazz,
InternalLogLevel level,
boolean hexDump)
Creates a new instance with the specified logger name. |
|
LoggingHandler(InternalLogLevel level)
Creates a new instance whose logger name is the fully qualified class name of the instance. |
|
LoggingHandler(InternalLogLevel level,
boolean hexDump)
Creates a new instance whose logger name is the fully qualified class name of the instance. |
|
LoggingHandler(java.lang.String name)
Creates a new instance with the specified logger name and with hex dump enabled. |
|
LoggingHandler(java.lang.String name,
boolean hexDump)
Creates a new instance with the specified logger name. |
|
LoggingHandler(java.lang.String name,
InternalLogLevel level,
boolean hexDump)
Creates a new instance with the specified logger name. |
|
| Method Summary | |
|---|---|
InternalLogLevel |
getLevel()
Returns the InternalLogLevel that this handler uses to log
a ChannelEvent. |
InternalLogger |
getLogger()
Returns the InternalLogger that this handler uses to log
a ChannelEvent. |
void |
handleDownstream(ChannelHandlerContext ctx,
ChannelEvent e)
Handles the specified downstream event. |
void |
handleUpstream(ChannelHandlerContext ctx,
ChannelEvent e)
Handles the specified upstream event. |
void |
log(ChannelEvent e)
Logs the specified event to the InternalLogger returned by
getLogger(). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LoggingHandler()
public LoggingHandler(InternalLogLevel level)
level - the log levelpublic LoggingHandler(boolean hexDump)
hexDump - true if and only if the hex dump of the received
message is logged
public LoggingHandler(InternalLogLevel level,
boolean hexDump)
level - the log levelhexDump - true if and only if the hex dump of the received
message is loggedpublic LoggingHandler(java.lang.Class<?> clazz)
public LoggingHandler(java.lang.Class<?> clazz,
boolean hexDump)
hexDump - true if and only if the hex dump of the received
message is logged
public LoggingHandler(java.lang.Class<?> clazz,
InternalLogLevel level)
level - the log level
public LoggingHandler(java.lang.Class<?> clazz,
InternalLogLevel level,
boolean hexDump)
level - the log levelhexDump - true if and only if the hex dump of the received
message is loggedpublic LoggingHandler(java.lang.String name)
public LoggingHandler(java.lang.String name,
boolean hexDump)
hexDump - true if and only if the hex dump of the received
message is logged
public LoggingHandler(java.lang.String name,
InternalLogLevel level,
boolean hexDump)
level - the log levelhexDump - true if and only if the hex dump of the received
message is logged| Method Detail |
|---|
public InternalLogger getLogger()
InternalLogger that this handler uses to log
a ChannelEvent.
public InternalLogLevel getLevel()
InternalLogLevel that this handler uses to log
a ChannelEvent.
public void log(ChannelEvent e)
InternalLogger returned by
getLogger(). If hex dump has been enabled for this handler,
the hex dump of the ChannelBuffer in a MessageEvent will
be logged together.
public void handleUpstream(ChannelHandlerContext ctx,
ChannelEvent e)
throws java.lang.Exception
ChannelUpstreamHandler
handleUpstream in interface ChannelUpstreamHandlerctx - the context object for this handlere - the upstream event to process or intercept
java.lang.Exception
public void handleDownstream(ChannelHandlerContext ctx,
ChannelEvent e)
throws java.lang.Exception
ChannelDownstreamHandler
handleDownstream in interface ChannelDownstreamHandlerctx - the context object for this handlere - the downstream event to process or intercept
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||