Cisco Cisco Unified Customer Voice Portal 10.0(1) Developer's Guide
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
4.1(1)
74
Server and Cisco Unified Call Studio Chapter 2 in the section entitled Variables for more on
global data).
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
logger in its initialize method or while handling events. A logger that does not have that
requirement must still implement the destroy method but can define an empty implementation.
Typically, this would involve closing database connections or files that were opened by the
logger in its initialize method or while handling events. A logger that does not have that
requirement must still implement the destroy method but can define an empty implementation.
void log(GlobalEvent event)
This method is the execution method for the logger and is called by VXML Server when a new
event has occurred that the logger must handle. This method is called only if VXML Server has
found the event’s ID in the
event has occurred that the logger must handle. This method is called only if VXML Server has
found the event’s ID in the
eventsToListenFor HashSet
.
Only one object is passed to this method, a
GlobalEvent
. This object encapsulates all the
information about the event and provides access to other environment information depending on
the type of event.
the type of event.
GlobalEvent
is a base class for all global level events and the logger will
typically check for the event type and cast to the appropriate event to get its information. All
event classes are found in the
event classes are found in the
com.audium.server.logger.events
package.
void doPreLogActivity(GlobalEvent event)
void doPostLogActivity(GlobalEvent event)
void doPostLogActivity(GlobalEvent event)
These two methods can be optionally overridden to perform any activity desired before and after
the
the
log
method is called. By default these methods are defined in the
GlobalLoggerBase
class
to do nothing.
Application Logger Methods
void initialize(File configFile, LoggerApplicationAPI api)
This method is called by VXML Server when a new logger instance is created. This occurs in
four different situations: the application server starts up, VXML Server web application is
restarted, the application the logger instance belongs to is deployed after the application server
had started up, and the application is updated. These situations are the same as those for when
the application start class is called (see Chapter 10: Application Start Classes for more on these
situations).
four different situations: the application server starts up, VXML Server web application is
restarted, the application the logger instance belongs to is deployed after the application server
had started up, and the application is updated. These situations are the same as those for when
the application start class is called (see Chapter 10: Application Start Classes for more on these
situations).
The application designer has optionally included a reference to a configuration file for the logger
which is passed here as a
which is passed here as a
File
object. If no configuration file reference was specified in the
application settings, this object will be
null
.
The method also receives a
LoggerApplicationAPI
object, which is used to access the
GlobalAPI. The GlobalAPI provides access to application data and 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 application and global data).
Guide for Cisco Unified CVP VXML Server and Cisco Unified Call Studio Chapter 2 in the
section entitled Variables for more on application and global data).