Cisco Cisco Computer Telephony Integration OS 8.5 Guia Do Programador

Página de 500
   
B-3
CTI OS Developer’s Guide for Cisco ICM/IPCC Enterprise & Hosted Editions
Cisco CTI OS Release 7.2(1)
Appendix B      CTI OS Logging
Java CIL Logging Utilities
Java CIL Logging Utilities
The Java CIL provides a different logging facility than the C++ CIL. This gives the customer application 
more flexibility in how trace messages are handled. It also limits the number of special privileges the 
browser would need to give the applet using the CIL; the Java CIL will only need to access the network 
and not the file system. For that reason, the Java CIL does its tracing through the firing of special events 
called “LogEvents” that the custom application can trap and handle in however way it sees fit. 
The Java CIL provides the following objects for logging as part of the utilities package:
ILogEvents
This interface must be implemented by a class interested in receiving Java CIL LogEvents. It only has 
one method.
void processLogEvent(LogEvent event)
LogEvent
A custom application that is interested in receiving LogEvents will receive an object of this type 
whenever a log message is generated. This class extends the Java “EventObject”, and has one public 
method:
Method
Description
getDescription
Returns the text description to write somewhere.
String getDescription()
Logger
A custom application that is interested in firing or handling its own LogEvents, can create an instance 
of this class.
Method
Description
Logger
Public constructor of the Logger object.
Trace
Lets the custom app fire a LogEvent
GetTraceMask
Gets the trace mask.
IsTraceMaskEnabled
Determines if a certain trace mask is set.
addLogListener
Subscribe to receive LogEvents.
removeLogListener
Unsubscribe from receiving LogEvents.