com.resilientedge.util.logger
Class MemoryHandler

java.lang.Object
  |
  +--com.resilientedge.util.logger.AbstractHandler
        |
        +--com.resilientedge.util.logger.MemoryHandler
All Implemented Interfaces:
Handler

public class MemoryHandler
extends AbstractHandler

A Handler for logging messages to the Memory.

Author:
gq

Constructor Summary
MemoryHandler()
          Construct a handler with its default formatter.
 
Method Summary
 void flush()
          This method empties the memory buffer
 java.lang.String getContent()
          This method returns the content of the memory buffer and flush the buffer afterwards
 Formatter getDefaultFormatter()
          This method returns the default Formatter for this Handler.
 void publish(LogRecord logRecord)
          This method processes the log record and displays the message using System.out.println().
 
Methods inherited from class com.resilientedge.util.logger.AbstractHandler
getFormatter, lookupConfig, setFormatter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryHandler

public MemoryHandler()
Construct a handler with its default formatter.
Method Detail

getDefaultFormatter

public Formatter getDefaultFormatter()
This method returns the default Formatter for this Handler. The default Formatter for a Memory Handler is a NoTimestampConsole Formatter.
Overrides:
getDefaultFormatter in class AbstractHandler
Returns:
 

getContent

public java.lang.String getContent()
This method returns the content of the memory buffer and flush the buffer afterwards
Returns:
 

flush

public void flush()
This method empties the memory buffer

publish

public void publish(LogRecord logRecord)
             throws LoggerException
This method processes the log record and displays the message using System.out.println().
Overrides:
publish in class AbstractHandler
Parameters:
logRecord -  
Throws:
LoggerException -  


Copyright © 2001 Resilient Edge, Inc. All Rights Reserved.