Cisco Cisco Customer Voice Portal Downloads Release Note

Page of 113
C
HAPTER 
13:
 
L
OGGERS
 
 
P
ROGRAMMING 
G
UIDE FOR 
C
ISCO 
U
NIFIED 
CVP
 
VXML
 
S
ERVER 
 
 
 
AND 
C
ISCO 
U
NIFIED 
C
ALL 
S
TUDIO 
R
ELEASE 
7.0(1) 
 
 
 
 
79 
call when an event is to be handled. These methods may throw an 
EventException
 to indicate 
an error in the logger.  
An application logger has the additional requirement of implementing a Java marker interface 
named 
LoggerPlugin
 to allow Unified CVP Builder for Call Studio to recognize it as a valid 
logger. 
All Java classes related to loggers are found in the 
com.audium.server.logger
 package while 
the logger event classes are found in the 
com.audium.server.logger.events
 package. 
Global Logger Methods 
void initialize(File configFile, LoggerGlobalAPI api) 
This method is called by VXML Server when a new logger instance is created. This occurs in 
two different situations: the application server starts up or the VXML Server web application is 
restarted. 
The global logger designer has optionally included a reference to a configuration file for the 
logger which is passed here as a 
File
 object. If no configuration file reference was specified in 
the conf directory, this object will be 
null
The method also receives a 
LoggerGlobalAPI
 object, which is used to access the GlobalAPI. 
The GlobalAPI provides access to global data (see the User Guide for Cisco Unified CVP VXML 
Server and Cisco Unified Call Studio
 Chapter 2 in the section entitled Variables for more on 
global data).  
Aside from initializing the logger, this method is also responsible for configuring which events 
the logger instance is to handle. This is done by setting the value of the member variable 
eventsToListenFor
. This variable is a 
HashSet
 that must contain all the event IDs that the 
logger listens for. VXML Server accesses this 
HashSet
 to determine if a new event should be 
sent to the logger. When an event occurs, 
eventsToListenFor
 is accessed to see if the event ID 
can be found. If so, the logger will be notified of the event. The IDs for the events are defined in 
the interface 
IEventIDs.
 
GlobalLoggerBase
 implements this interface so the event IDs are 
available directly within the logger class. Note that global loggers can only register for global 
events (those whose event names begin with GLOBAL). 
void destroy(LoggerGlobalAPI api) 
This method is called in two different situations: the application server is shut down, or the 
VXML Server web application is restarted.  
The method also receives a 
LoggerGlobalAPI
 object, which is used to access the GlobalAPI. 
The GlobalAPI provides access to global data (see the User Guide for Cisco Unified CVP VXML