Cisco Cisco Unified Customer Voice Portal 10.5(1) Release Note

Page of 113
C
HAPTER 
11:
 
A
PPLICATION 
E
ND 
C
LASSES
 
 
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) 
 
 
 
 
68 
by an application start class or by code run within calls to the application. Application end 
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 VXML 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 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). 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