public class MemoryLogHandler extends Handler implements INotificationSupport
| Constructor and Description |
|---|
MemoryLogHandler(String id) |
MemoryLogHandler(String id,
int size) |
| Modifier and Type | Method and Description |
|---|---|
void |
addNotificationListener(EventType type,
INotificationListener listener)
Add
listener to the collection of objects to be informed
when the receiver triggers an event of type name. |
void |
clear() |
void |
close() |
void |
flush() |
String |
getId() |
LogRecord[] |
getLogRecords() |
int |
getSize() |
String |
getString() |
void |
publish(LogRecord record) |
void |
publishTo(Handler target)
Push all records from the buffer to the target
Handler and clear
the buffer afterwards. |
void |
publishTo(Logger target)
Push all records from the buffer to the target
Logger and clear
the buffer afterwards. |
void |
removeNotificationListener(EventType type,
INotificationListener listener)
Remove
listener from the collection of objects to be
informed about events of type name. |
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, setEncoding, setErrorManager, setFilter, setFormatter, setLevelpublic MemoryLogHandler(String id)
public MemoryLogHandler(String id, int size)
public void addNotificationListener(EventType type, INotificationListener listener)
INotificationSupportlistener to the collection of objects to be informed
when the receiver triggers an event of type name.addNotificationListener in interface INotificationSupporttype - The event type we are interested in.listener - The object to be informed about an event occurrencepublic void clear()
public void close()
throws SecurityException
close in class HandlerSecurityExceptionpublic String getId()
public LogRecord[] getLogRecords()
public int getSize()
public String getString()
public void publishTo(Handler target)
Handler and clear
the buffer afterwards.target - public void publishTo(Logger target)
Logger and clear
the buffer afterwards.target - public void removeNotificationListener(EventType type, INotificationListener listener)
INotificationSupportlistener from the collection of objects to be
informed about events of type name.removeNotificationListener in interface INotificationSupporttype - The event type we are no longer interested in.listener - The object registered for the event till now.Copyright © 2013 intarsys consulting GmbH. All Rights Reserved.