nl.tudelft.simulation.logger.handlers
Class MemoryHandler

java.lang.Object
  extended by java.util.logging.Handler
      extended by nl.tudelft.simulation.logger.handlers.MemoryHandler

public class MemoryHandler
extends Handler

A MemoryHandler which makes it possible to push to a dynamic target.
(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

Constructor Summary
MemoryHandler()
          constructs a new MemoryHandler
MemoryHandler(int size)
          constructs a new MemoryHandler
 
Method Summary
 void close()
           
 void flush()
           
 Formatter getFormatter()
           
 int getSize()
          returns the size
 void publish(LogRecord logRecord)
           
 void push(Handler target)
          pushes the memory to a handler
 void setFormatter(Formatter arg0)
           
 void setSize(int size)
          sets the number of records this handler can hold
 
Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryHandler

public MemoryHandler()
constructs a new MemoryHandler


MemoryHandler

public MemoryHandler(int size)
constructs a new MemoryHandler

Parameters:
size - the size of the memoryHandler
Method Detail

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()

getFormatter

public Formatter getFormatter()
Overrides:
getFormatter in class Handler
See Also:
Handler.getFormatter()

getSize

public int getSize()
returns the size

Returns:
int the number of records this handler can hold

publish

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

push

public void push(Handler target)
pushes the memory to a handler

Parameters:
target - the target

setFormatter

public void setFormatter(Formatter arg0)
Overrides:
setFormatter in class Handler
See Also:
Handler.setFormatter(java.util.logging.Formatter)

setSize

public void setSize(int size)
sets the number of records this handler can hold

Parameters:
size - the size


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