public class RemoteLogPoller extends java.lang.Object implements java.lang.Runnable, LogArchiver, ConsoleArchiver
MAX_HISTORY, NO_LOG_AVAILABLE
Constructor and Description |
---|
RemoteLogPoller(java.lang.Object root,
int consoleHistoryLines,
int logHistoryLines)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addConsoleListener(LogListener l,
java.lang.Object component,
long last,
int max)
Add a listener to the archiver which will receive all missed
events.
|
void |
addLogListener(LogListener l,
java.lang.Object component,
LogLevel level,
long last,
int max)
Add a listener to the archiver which will receive all missed
events.
|
java.lang.String |
consoleIdFor(java.lang.Object component)
Get the console id for a given component.
|
long |
getLogPollingInterval() |
void |
onDestroy() |
void |
poll()
Poll a remote MBean for Log Messages.
|
void |
removeConsoleListener(LogListener l,
java.lang.Object component)
Remove the LogListener.
|
void |
removeLogListener(LogListener l,
java.lang.Object component)
Remove the LogListener.
|
void |
run() |
void |
setLogPollingInterval(long logPollingInterval) |
void |
stop()
Stop polling.
|
public RemoteLogPoller(java.lang.Object root, int consoleHistoryLines, int logHistoryLines)
public void addLogListener(LogListener l, java.lang.Object component, LogLevel level, long last, int max)
LogArchiver
Event numbers begin at 0. To receive all events, last must be -1.
addLogListener
in interface LogArchiver
l
- The logListener which will receive the events.level
- The level of events required.last
- The last event number received. The LogArchive will
not send messages from before this number.max
- The maximum messages to send up to the most recent.public void removeLogListener(LogListener l, java.lang.Object component)
LogArchiver
removeLogListener
in interface LogArchiver
l
- The LogListener.public void addConsoleListener(LogListener l, java.lang.Object component, long last, int max)
ConsoleArchiver
addConsoleListener
in interface ConsoleArchiver
l
- The logListener which will receive the events.component
- The component whose console to receive events for.last
- The last event number received. The LogArchive will
not send messages from before this number.max
- The maximum messages to send up to the most recent.public void removeConsoleListener(LogListener l, java.lang.Object component)
ConsoleArchiver
removeConsoleListener
in interface ConsoleArchiver
l
- The LogListener.public java.lang.String consoleIdFor(java.lang.Object component)
ConsoleArchiver
consoleIdFor
in interface ConsoleArchiver
component
- The component.public long getLogPollingInterval()
public void setLogPollingInterval(long logPollingInterval)
public void poll()
public void run()
run
in interface java.lang.Runnable
public void stop()
public void onDestroy()