|
OSGi™ Service Platform Release 2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Provides methods to retrieve LogEntry objects from the log.
There are two ways to retrieve LogEntry objects:
LogEntry
,
LogListener
,
LogListener.logged(LogEntry)
Method Summary | |
void |
addLogListener(LogListener listener)
Subscribes to LogEntry objects. |
java.util.Enumeration |
getLog()
Returns an Enumeration of all LogEntry objects in the log. |
void |
removeLogListener(LogListener listener)
Unsubscribes to LogEntry objects. |
Method Detail |
public void addLogListener(LogListener listener)
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.
listener
- A LogListener object to register; the
LogListener object is used to receive LogEntry objects.LogListener
,
LogEntry
,
LogListener.logged(LogEntry)
public void removeLogListener(LogListener listener)
This method unregisters a LogListener object from the Log Reader Service.
listener
- A LogListener object to unregister.LogListener
public java.util.Enumeration getLog()
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.
|
OSGi™ Service Platform Release 2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |