public class ExtendedLogReaderServiceImpl extends Object implements ExtendedLogReaderService
| Modifier and Type | Method and Description |
|---|---|
void |
addLogListener(LogListener listener)
Subscribes to
LogEntry objects. |
void |
addLogListener(LogListener listener,
LogFilter filter)
Subscribes to
LogEntry objects. |
Enumeration |
getLog()
Returns an
Enumeration of all LogEntry objects in
the log. |
void |
removeLogListener(LogListener listener)
Unsubscribes to
LogEntry objects. |
public void addLogListener(LogListener listener, LogFilter filter)
ExtendedLogReaderServiceLogEntry objects.
This method registers a LogListener object with the Log Reader
Service with a LogFilter to allow pre-filtering of interesting log entries.
The LogListener.logged(LogEntry) method will be
called for each LogEntry object placed into the log that matches the filter.
addLogListener in interface ExtendedLogReaderServicelistener - A LogListener object to register; the
LogListener object is used to receive LogEntry
objects.filter - A LogFilter object to register; the
LogFilter object is used to filter LogEntry
objects before sending them to the associated LogListener.LogListener,
LogFilter,
LogEntry,
LogReaderService.addLogListener(LogListener)public void addLogListener(LogListener listener)
LogReaderServiceLogEntry objects.
This method registers a LogListener object with the Log Reader
Service. The LogListener.logged(LogEntry) method will be
called for each LogEntry object placed into the log.
When a bundle which registers a LogListener object is stopped
or otherwise releases the Log Reader Service, the Log Reader Service must
remove all of the bundle's listeners.
If this Log Reader Service's list of listeners already contains a
listener l such that (l==listener), this method
does nothing.
addLogListener in interface LogReaderServicelistener - A LogListener object to register; the
LogListener object is used to receive LogEntry
objects.LogListener,
LogEntry,
LogListener.logged(LogEntry)public Enumeration getLog()
LogReaderServiceEnumeration of all LogEntry objects in
the log.
Each element of the enumeration is a LogEntry object, ordered
with the most recent entry first. Whether the enumeration is of all
LogEntry objects since the Log Service was started or some
recent past is implementation-specific. Also implementation-specific is
whether informational and debug LogEntry objects are included
in the enumeration.
getLog in interface LogReaderServiceEnumeration of all LogEntry objects in
the log.public void removeLogListener(LogListener listener)
LogReaderServiceLogEntry objects.
This method unregisters a LogListener object from the Log
Reader Service.
If listener is not contained in this Log Reader Service's list
of listeners, this method does nothing.
removeLogListener in interface LogReaderServicelistener - A LogListener object to unregister.LogListenerCopyright © 2007–2016 The Apache Software Foundation. All rights reserved.