org.productivity.java.syslog4j.impl.backlog
Class NullSyslogBackLogHandler

java.lang.Object
  extended by org.productivity.java.syslog4j.impl.backlog.NullSyslogBackLogHandler
All Implemented Interfaces:
SyslogBackLogHandlerIF

public class NullSyslogBackLogHandler
extends java.lang.Object
implements SyslogBackLogHandlerIF

NullSyslogBackLogHandler can be used if there's no need for a last-chance logging mechanism whenever the Syslog protocol fails.

Syslog4j is licensed under the Lesser GNU Public License v2.1. A copy of the LGPL license is available in the META-INF folder in all distributions of Syslog4j and in the base directory of the "doc" ZIP.

Version:
$Id: NullSyslogBackLogHandler.java,v 1.2 2010/10/25 03:50:25 cvs Exp $
Author:
<syslog4j@productivity.org>

Field Summary
static NullSyslogBackLogHandler INSTANCE
           
 
Constructor Summary
NullSyslogBackLogHandler()
           
 
Method Summary
 void down(SyslogIF syslog, java.lang.String reason)
          Implement down(syslog,reason) to notify/log when the syslog protocol is unavailable.
 void initialize()
          Implement initialize() to handle one-time set-up for this backLog handler.
 void log(SyslogIF syslog, int level, java.lang.String message, java.lang.String reason)
           
 void up(SyslogIF syslog)
          Implement up(syslog) to notify/log when the syslog protocol becomes available after a down condition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final NullSyslogBackLogHandler INSTANCE
Constructor Detail

NullSyslogBackLogHandler

public NullSyslogBackLogHandler()
Method Detail

initialize

public void initialize()
Description copied from interface: SyslogBackLogHandlerIF
Implement initialize() to handle one-time set-up for this backLog handler.

Specified by:
initialize in interface SyslogBackLogHandlerIF

down

public void down(SyslogIF syslog,
                 java.lang.String reason)
Description copied from interface: SyslogBackLogHandlerIF
Implement down(syslog,reason) to notify/log when the syslog protocol is unavailable.

Specified by:
down in interface SyslogBackLogHandlerIF
Parameters:
syslog - - SyslogIF instance causing this down condition
reason - - reason given for the down condition

up

public void up(SyslogIF syslog)
Description copied from interface: SyslogBackLogHandlerIF
Implement up(syslog) to notify/log when the syslog protocol becomes available after a down condition.

Specified by:
up in interface SyslogBackLogHandlerIF
Parameters:
syslog - - SyslogIF instance which is now available

log

public void log(SyslogIF syslog,
                int level,
                java.lang.String message,
                java.lang.String reason)
Specified by:
log in interface SyslogBackLogHandlerIF
Parameters:
syslog - - SyslogIF instance which cannot handle this log event
level - - message level
message - - message (in String form)
reason - - reason given for why this message could not be handled