public class LogMonitor extends ContextSubscriber implements LogListenerEx, BusMemberListener
busResourceURI, owner, theBus
LOG_LEVEL_DEBUG, LOG_LEVEL_ERROR, LOG_LEVEL_INFO, LOG_LEVEL_TRACE, LOG_LEVEL_WARN
Constructor and Description |
---|
LogMonitor() |
Modifier and Type | Method and Description |
---|---|
void |
add(MemberData member) |
void |
communicationChannelBroken()
Method to be called when the communication of the Subsccriber with the
Context Bus is lost.
|
JComponent |
getComponent() |
String |
getTitle() |
void |
handleContextEvent(ContextEvent event)
Method to be called when an Event forwarded in the Context Bus matches
one of the Patterns registered by this Subscriber.
|
void |
log(int logLevel,
String module,
String pkg,
String cls,
String method,
Object[] msgPart,
Throwable t)
Log a new message.
|
void |
regParamsAdded(String busMemberID,
Resource[] params) |
void |
regParamsRemoved(String busMemberID,
Resource[] params) |
void |
remove(String busMemberID) |
void |
stop() |
addNewRegParams, busDyingOut, getAllProvisions, getMyID, handleEvent, removeMatchingRegParams
close, getComment, getLabel, getType, getURI, setComment, setLabel
public void log(int logLevel, String module, String pkg, String cls, String method, Object[] msgPart, Throwable t)
LogListener
log
in interface LogListener
logLevel
- the log level (trace, debug, info, warn, or error)module
- the name of the module that contains the class that intends to
generate the log messagepkg
- the name of the package that contains the class that intends
to generate the log messagecls
- the name of the class that intends to generate the log messagemethod
- The name of the method in the above Java class that intends to
generate the log messagemsgPart
- An array of strings and other objects that should be
concatenated using String.valueOf(Object)
in
order to construct the log messaget
- An optional Throwable
object like an
exception that might have caused the log requestpublic JComponent getComponent()
getComponent
in interface LogListenerEx
public String getTitle()
getTitle
in interface LogListenerEx
public void stop()
stop
in interface LogListenerEx
public void add(MemberData member)
add
in interface BusMemberListener
public void remove(String busMemberID)
remove
in interface BusMemberListener
public void regParamsAdded(String busMemberID, Resource[] params)
regParamsAdded
in interface BusMemberListener
public void regParamsRemoved(String busMemberID, Resource[] params)
regParamsRemoved
in interface BusMemberListener
public void handleContextEvent(ContextEvent event)
ContextSubscriber
handleContextEvent
in class ContextSubscriber
event
- The Context Event that matched the registered Patternspublic void communicationChannelBroken()
ContextSubscriber
communicationChannelBroken
in class ContextSubscriber
Copyright © 2018 universAAL Consortium. All rights reserved.