nl.tudelft.simulation.logger.handlers
Class EventLogHandler

java.lang.Object
  extended by java.util.logging.Handler
      extended by nl.tudelft.simulation.logger.handlers.EventLogHandler
All Implemented Interfaces:
EventProducerInterface

public class EventLogHandler
extends Handler
implements EventProducerInterface

A EventLogHandler
(c) copyright 2002-2005 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: Lesser General Public License (LGPL) , no warranty.

Version:
$Revision: 1.1 $ $Date: 2007/01/06 13:26:12 $
Author:
Peter Jacobs , Niels Lang

Field Summary
static EventType LOG_RECORD_PRODUCED_EVENT
          LOG_RECORD_PRODUCED_EVENT is fired whenever an log record is received
 
Fields inherited from interface nl.tudelft.simulation.event.EventProducerInterface
FIRST_POSITION, LAST_POSITION
 
Constructor Summary
EventLogHandler()
          constructs a new EventLogHandler
 
Method Summary
 boolean addListener(EventListenerInterface listener, EventType eventType)
           
 boolean addListener(EventListenerInterface listener, EventType eventType, boolean weak)
           
 boolean addListener(EventListenerInterface listener, EventType eventType, short position)
           
 boolean addListener(EventListenerInterface listener, EventType eventType, short position, boolean weak)
           
 void close()
           
 void flush()
           
 EventType[] getEventTypes()
           
 void publish(LogRecord arg0)
           
 boolean removeListener(EventListenerInterface listener, EventType eventType)
           
 
Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG_RECORD_PRODUCED_EVENT

public static final EventType LOG_RECORD_PRODUCED_EVENT
LOG_RECORD_PRODUCED_EVENT is fired whenever an log record is received

Constructor Detail

EventLogHandler

public EventLogHandler()
constructs a new EventLogHandler

Method Detail

addListener

public boolean addListener(EventListenerInterface listener,
                           EventType eventType)
Specified by:
addListener in interface EventProducerInterface
See Also:
#addListener(nl.tudelft.simulation.event.EventListenerInterface, nl.tudelft.simulation.event.EventType)

addListener

public boolean addListener(EventListenerInterface listener,
                           EventType eventType,
                           boolean weak)
Specified by:
addListener in interface EventProducerInterface
See Also:
#addListener(nl.tudelft.simulation.event.EventListenerInterface, nl.tudelft.simulation.event.EventType, boolean)

addListener

public boolean addListener(EventListenerInterface listener,
                           EventType eventType,
                           short position)
Specified by:
addListener in interface EventProducerInterface
See Also:
#addListener(nl.tudelft.simulation.event.EventListenerInterface, nl.tudelft.simulation.event.EventType, short)

addListener

public boolean addListener(EventListenerInterface listener,
                           EventType eventType,
                           short position,
                           boolean weak)
Specified by:
addListener in interface EventProducerInterface
See Also:
#addListener(nl.tudelft.simulation.event.EventListenerInterface, nl.tudelft.simulation.event.EventType, short,boolean)

close

public void close()
Specified by:
close in class Handler
See Also:
Handler.close()

flush

public void flush()
Specified by:
flush in class Handler
See Also:
Handler.flush()

getEventTypes

public EventType[] getEventTypes()
Specified by:
getEventTypes in interface EventProducerInterface
See Also:
EventProducerInterface.getEventTypes()

publish

public void publish(LogRecord arg0)
Specified by:
publish in class Handler
See Also:
Handler.publish(java.util.logging.LogRecord)

removeListener

public boolean removeListener(EventListenerInterface listener,
                              EventType eventType)
Specified by:
removeListener in interface EventProducerInterface
See Also:
#removeListener(nl.tudelft.simulation.event.EventListenerInterface, nl.tudelft.simulation.event.EventType)


Copyright © 2002-2011 Delft University of Technology, the Netherlands. All Rights Reserved.