public class MemoryLogHandler extends java.util.logging.Handler implements INotificationSupport
Constructor and Description |
---|
MemoryLogHandler() |
MemoryLogHandler(java.lang.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() |
java.lang.String |
getId() |
java.util.logging.LogRecord[] |
getLogRecords() |
int |
getSize() |
java.lang.String |
getString() |
void |
publish(java.util.logging.LogRecord record) |
void |
removeNotificationListener(EventType type,
INotificationListener listener)
Remove
listener from the collection of objects to be
informed about events of type name . |
void |
setId(java.lang.String id) |
void |
setSize(int size) |
protected void |
triggerChanged(java.lang.Object attribute,
java.lang.Object oldValue,
java.lang.Object newValue) |
protected void |
triggerEvent(Event event) |
public MemoryLogHandler()
public MemoryLogHandler(java.lang.String id, int size)
public void addNotificationListener(EventType type, INotificationListener listener)
INotificationSupport
listener
to the collection of objects to be informed
when the receiver triggers an event of type name
.addNotificationListener
in interface INotificationSupport
type
- The event type we are interested in.listener
- The object to be informed about an event occurrencepublic void clear()
public void close() throws java.lang.SecurityException
close
in class java.util.logging.Handler
java.lang.SecurityException
public void flush()
flush
in class java.util.logging.Handler
public java.lang.String getId()
public java.util.logging.LogRecord[] getLogRecords()
public int getSize()
public java.lang.String getString()
public void publish(java.util.logging.LogRecord record)
publish
in class java.util.logging.Handler
public void removeNotificationListener(EventType type, INotificationListener listener)
INotificationSupport
listener
from the collection of objects to be
informed about events of type name
.removeNotificationListener
in interface INotificationSupport
type
- The event type we are no longer interested in.listener
- The object registered for the event till now.public void setId(java.lang.String id)
public void setSize(int size)
protected void triggerChanged(java.lang.Object attribute, java.lang.Object oldValue, java.lang.Object newValue)
protected void triggerEvent(Event event)