org.productivity.java.syslog4j.server.impl.event.printstream
Class PrintStreamSyslogServerEventHandler

java.lang.Object
  extended by org.productivity.java.syslog4j.server.impl.event.printstream.PrintStreamSyslogServerEventHandler
All Implemented Interfaces:
java.io.Serializable, SyslogServerEventHandlerIF, SyslogServerSessionEventHandlerIF
Direct Known Subclasses:
FileSyslogServerEventHandler, SystemErrSyslogServerEventHandler, SystemOutSyslogServerEventHandler

public class PrintStreamSyslogServerEventHandler
extends java.lang.Object
implements SyslogServerSessionEventHandlerIF

SystemOutSyslogServerEventHandler provides a simple example implementation of the SyslogServerEventHandlerIF which writes the events to System.out.

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: PrintStreamSyslogServerEventHandler.java,v 1.7 2010/11/28 22:07:57 cvs Exp $
Author:
<syslog4j@productivity.org>
See Also:
Serialized Form

Field Summary
protected  java.io.PrintStream stream
           
 
Constructor Summary
PrintStreamSyslogServerEventHandler(java.io.PrintStream stream)
           
 
Method Summary
 void destroy(SyslogServerIF syslogServer)
           
 void event(java.lang.Object session, SyslogServerIF syslogServer, java.net.SocketAddress socketAddress, SyslogServerEventIF event)
           
 void exception(java.lang.Object session, SyslogServerIF syslogServer, java.net.SocketAddress socketAddress, java.lang.Exception exception)
           
 void initialize(SyslogServerIF syslogServer)
           
 void sessionClosed(java.lang.Object session, SyslogServerIF syslogServer, java.net.SocketAddress socketAddress, boolean timeout)
           
 java.lang.Object sessionOpened(SyslogServerIF syslogServer, java.net.SocketAddress socketAddress)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stream

protected java.io.PrintStream stream
Constructor Detail

PrintStreamSyslogServerEventHandler

public PrintStreamSyslogServerEventHandler(java.io.PrintStream stream)
Method Detail

initialize

public void initialize(SyslogServerIF syslogServer)
Specified by:
initialize in interface SyslogServerEventHandlerIF

sessionOpened

public java.lang.Object sessionOpened(SyslogServerIF syslogServer,
                                      java.net.SocketAddress socketAddress)
Specified by:
sessionOpened in interface SyslogServerSessionEventHandlerIF

event

public void event(java.lang.Object session,
                  SyslogServerIF syslogServer,
                  java.net.SocketAddress socketAddress,
                  SyslogServerEventIF event)
Specified by:
event in interface SyslogServerSessionEventHandlerIF

exception

public void exception(java.lang.Object session,
                      SyslogServerIF syslogServer,
                      java.net.SocketAddress socketAddress,
                      java.lang.Exception exception)
Specified by:
exception in interface SyslogServerSessionEventHandlerIF

sessionClosed

public void sessionClosed(java.lang.Object session,
                          SyslogServerIF syslogServer,
                          java.net.SocketAddress socketAddress,
                          boolean timeout)
Specified by:
sessionClosed in interface SyslogServerSessionEventHandlerIF

destroy

public void destroy(SyslogServerIF syslogServer)
Specified by:
destroy in interface SyslogServerEventHandlerIF