|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sblim.cimclient.internal.logging.LogAndTraceBroker
public class LogAndTraceBroker
Class LogAndTraceBroker is the central class that implements the logging and tracing of the CIM Client. It manages the collections of the internal log and trace listeners. It sets up the application independent logging. It provides the API to send log and trace messages and forwards them to the appropriate listeners.
Method Summary | |
---|---|
void |
addLogListener(LogListener pListener)
Adds a listener for log messages. |
void |
addTraceListener(TraceListener pListener)
Adds a listener for log messages. |
void |
clearLogListeners()
Removes all listeners. |
void |
clearTraceListeners()
Removes all listeners. |
void |
entry()
Forwards a method entry message to the registered trace listeners. |
void |
exit()
Forwards a method exit message to the registered trace listeners. |
static LogAndTraceBroker |
getBroker()
Returns the singleton instance of the broker |
List<LogListener> |
getLogListeners()
Gets the registered log listeners including the internal console and file loggers. |
List<TraceListener> |
getTraceListeners()
Gets the registered trace listeners including the internal console and file loggers. |
OutputStream |
getXmlTraceStream()
Returns the output stream to which all CIM-XML traffic (outgoing & incoming) will be copied for debugging purposes. |
static boolean |
isLoggingStarted()
Returns if the logging framework has been initialized. |
void |
message(String pKey)
Forwards a log/trace message to the registered log&trace listeners. |
void |
message(String pKey,
Object pParameter)
Forwards a log/trace message to the registered log&trace listeners. |
void |
message(String pKey,
Object[] pParameters)
Forwards a log/trace message to the registered log&trace listeners. |
void |
registerInternalListeners()
Registers the listeners for our internal loggers |
void |
removeLogListener(LogListener pListener)
Remove a listener. |
void |
removeTraceListener(TraceListener pListener)
Removes a listener. |
void |
setXmlTraceStream(OutputStream pStream)
Sets an output stream to which all CIM-XML traffic (outgoing & incoming) will be copied for debugging purposes. |
void |
trace(Level pLevel,
String pMessage)
Forwards a trace message to the registered trace listeners. |
void |
trace(Level pLevel,
String pMessage,
Throwable pThrown)
Forwards a trace message to the registered trace listeners. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static LogAndTraceBroker getBroker()
public static boolean isLoggingStarted()
WBEMConfiguration
class to determine if the
logging is already up. The WBEMConfiguration
is initialized
before the logging, so methods in this class cannot assume the logging to
be up and running.
true
if the logging is up, false
otherwisepublic void registerInternalListeners()
public void addLogListener(LogListener pListener)
pListener
- The listenerpublic void removeLogListener(LogListener pListener)
pListener
- The listenerpublic void clearLogListeners()
public List<LogListener> getLogListeners()
public void addTraceListener(TraceListener pListener)
pListener
- The listenerpublic void removeTraceListener(TraceListener pListener)
pListener
- The listenerpublic void clearTraceListeners()
public List<TraceListener> getTraceListeners()
public void message(String pKey)
pKey
- The message identifier.public void message(String pKey, Object pParameter)
pKey
- The message identifier.pParameter
- The parameter for the messagepublic void message(String pKey, Object[] pParameters)
pKey
- The message identifier.pParameters
- The parameters for the messagepublic void trace(Level pLevel, String pMessage)
pLevel
- One of the three message level identifiers FINE, FINER and
FINESTpMessage
- The message textpublic void trace(Level pLevel, String pMessage, Throwable pThrown)
pLevel
- One of the three message level identifiers FINE, FINER and
FINESTpMessage
- The message textpThrown
- The throwable associated with the messagepublic void entry()
public void exit()
public OutputStream getXmlTraceStream()
null
value means that CIM-XML
debugging is disabledpublic void setXmlTraceStream(OutputStream pStream)
pStream
- The output stream. A null
value means that
CIM-XML debugging is disabled.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |