Cisco Cisco Unified Customer Voice Portal 10.0(1) Developer's Guide
C
HAPTER
11:
A
PPLICATION
E
ND
C
LASSES
V
OICE
XML
P
ROGRAMMING
G
UIDE
FOR
C
ISCO
U
NIFIED
C
USTOMER
V
OICE
P
ORTAL
R
ELEASE
4.0(1)
60
classes have the ability to create application or global data, though the concept of creating data
right before the application is released would seem pointless. The one situation where this would
be useful would be to set data that a subsequent application end class could use. For example, an
application start class could open up a database connection and store it in global data so that all
applications deployed on Unified CVP VoiceXML Server could utilize the connction. This
connection would need to be closed, but if there are multiple applications with multiple
application end classes, the desire would be to close the connection by the last application to be
released, in case the application end classes need to use the connection. Each application start
classes could increment an application count value stored in global data that the application end
classes would decrement. The application end class that yielded a zero would know that it was
the last application released and so close the database connection.
right before the application is released would seem pointless. The one situation where this would
be useful would be to set data that a subsequent application end class could use. For example, an
application start class could open up a database connection and store it in global data so that all
applications deployed on Unified CVP VoiceXML Server could utilize the connction. This
connection would need to be closed, but if there are multiple applications with multiple
application end classes, the desire would be to close the connection by the last application to be
released, in case the application end classes need to use the connection. Each application start
classes could increment an application count value stored in global data that the application end
classes would decrement. The application end class that yielded a zero would know that it was
the last application released and so close the database connection.
The application end class action is built by implementing the Unified CVP class
EndApplicationInterface
found in the
com.audium.server.proxy
package. It contains a
single method named
onEndApplication
that is the execution method for the application end
class. This method receives a single argument, an instance of
ApplicationEndAPI
. This class
belongs to the Global API and is used to access and create 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). The method does not have a
return value. It is expected that should an unrecoverable error occur, the application end class
will throw an
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). The method does not have a
return value. It is expected that should an unrecoverable error occur, the application end class
will throw an
AudiumException
.