public class PollingLogArchiver extends java.lang.Object implements LogArchiver
This archiver will remove a component from it's list of components to poll when no more listeners are listening to it.
This archiver will only poll the first component where many components share the same archive.
MAX_HISTORY, NO_LOG_AVAILABLE
Constructor and Description |
---|
PollingLogArchiver(ArchiveNameResolver resolver,
LogEventSource source)
Constructor with default history.
|
PollingLogArchiver(int history,
ArchiveNameResolver resolver,
LogEventSource source)
Constructor that accepts a history count.
|
Modifier and Type | Method and Description |
---|---|
void |
addLogListener(LogListener l,
java.lang.Object component,
LogLevel level,
long last,
int max)
Add a LogListener for the given component.
|
void |
onDestroy() |
void |
poll()
Poll for Log Messages.
|
void |
removeLogListener(LogListener l,
java.lang.Object component)
Remove the LogListener for the given component.
|
public PollingLogArchiver(ArchiveNameResolver resolver, LogEventSource source)
public PollingLogArchiver(int history, ArchiveNameResolver resolver, LogEventSource source)
public void addLogListener(LogListener l, java.lang.Object component, LogLevel level, long last, int max)
addLogListener
in interface LogArchiver
l
- The LogListener.component
- The component.level
- The level.last
- The last message number required.max
- The maximum history.public void removeLogListener(LogListener l, java.lang.Object component)
removeLogListener
in interface LogArchiver
l
- The LogListener.component
- The component.public void poll()
public void onDestroy()