Cisco Cisco Unified Customer Voice Portal 10.0(1) Developer's Guide
C
HAPTER
13:
L
OGGERS
V
OICE
XML
P
ROGRAMMING
G
UIDE
FOR
C
ISCO
U
NIFIED
C
USTOMER
V
OICE
P
ORTAL
R
ELEASE
4.0(1)
69
This method is called by Unified CVP VoiceXML Server when a new logger instance is created.
This occurs in four different situations: the application server starts up, the VoiceXML 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).
This occurs in four different situations: the application server starts up, the VoiceXML 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
VoiceXML Server User Guide for Cisco Unified Customer Voice Portal Chapter 2 in the section
entitled Variables for more on application and global data).
VoiceXML Server User Guide for Cisco Unified Customer Voice Portal Chapter 2 in the section
entitled Variables for more on application and 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
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. Unified CVP VoiceXML 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
events are defined in the interface
IApplicationEventIDs.
ApplicationLoggerBase
implements this interface so the event IDs are available directly within the logger class.
void destroy(LoggerApplicationAPI api)
This method is called by Unified CVP VoiceXML Server when an application is released. This
occurs in four different situations: the application server is shut down, the VoiceXML Server
web application is restarted, the application the logger instance belongs to is released, and the
application is updated. These situations are the same as those for when the application end class
is called (see Chapter 11: Application End Classes for more on these situations).
occurs in four different situations: the application server is shut down, the VoiceXML Server
web application is restarted, the application the logger instance belongs to is released, and the
application is updated. These situations are the same as those for when the application end class
is called (see Chapter 11: Application End Classes for more on these situations).
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
VoiceXML Server User Guide for Cisco Unified Customer Voice Portal Chapter 2 in the section
entitled Variables for more on application and global data).
VoiceXML Server User Guide for Cisco Unified Customer Voice Portal Chapter 2 in the section
entitled Variables for more on application and 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 calls. 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 calls. A logger that does not have that
requirement must still implement the destroy method but can define an empty implementation.
void log(ApplicationEvent event)