Cisco Cisco Customer Voice Portal 8.0(1) Developer's Guide
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
The following bullets details the 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.
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
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
(http://www.cisco.com/en/US/products/sw/custcosw/
ps1006/products_user_guide_list.html) Chapter 2 in the section entitled Variables for more
on global data).
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
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
the events are defined in the interface
IEventIDs
.
GlobalLoggerBase
implements this
interface so the event IDs are available directly within the logger class.
Note: Global loggers can only register for global events (those whose event names begin
with GLOBAL).
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.
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
(http://www.cisco.com/en/US/
products/sw/custcosw/ps1006/products_user_guide_list.html) Chapter 2 in the section entitled
Variables for more on global data).
Variables for more on global data).
The purpose of this method is to give the logger the opportunity to perform clean up operations.
Typically, this would involve closing database connections or files that were opened by the
Typically, this would involve closing database connections or files that were opened by the
Programming Guide for Cisco Unified CVP VXML Server and Cisco Unified Call Studio Release 8.0(1)
86
Chapter 13: Loggers
Global Logger Methods