Cisco Cisco Customer Voice Portal Downloads Veröffentlichungshinweis
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)
67
Chapter 11: Application End Classes
Application end classes are unlike most components in that they are not related to a call session.
Application end classes are instead associated with a particular application and are executed
when the application itself is taken down or updated. Currently, only the Java API can construct
code to run when an application starts.
Application end classes are instead associated with a particular application and are executed
when the application itself is taken down or updated. Currently, only the Java API can construct
code to run when an application starts.
An application can define in its application settings any number of application end classes.
VXML Server will execute the classes sequentially in the order they appear in the application’s
settings. By conforming to this order, a developer can create an application end class that stores
information that can then be referenced by subsequent end of application classes.
VXML Server will execute the classes sequentially in the order they appear in the application’s
settings. By conforming to this order, a developer can create an application end class that stores
information that can then be referenced by subsequent end of application classes.
Unlike application start classes, an error in one application end class does not cancel the
application release, once started the application will be released no matter what occurs. Should
an error occur in an application end class, an error event will be thrown for any error loggers to
report.
application release, once started the application will be released no matter what occurs. Should
an error occur in an application end class, an error event will be thrown for any error loggers to
report.
There are four situations where the application end class is run:
•
The application server is shut down. VXML Server is configured to shut down all of its own
operations as well as shut down each individual application by running their application end
classes.
operations as well as shut down each individual application by running their application end
classes.
•
The VXML Server web application is restarted. Most application servers provide the ability
to restart just a certain web application running within it rather than restarting the entire
application server. The act of restarting the web application that defines VXML Server will
prompt it to initiate the application unloading process, including calling its application end
classes just like an application server restart.
to restart just a certain web application running within it rather than restarting the entire
application server. The act of restarting the web application that defines VXML Server will
prompt it to initiate the application unloading process, including calling its application end
classes just like an application server restart.
•
An application is released after the VXML Server has started. Using the release
administration scripts, an application can be released while the system is actively handling
calls to other applications. VXML Server will first run all application end classes for the
application and then release it from memory.
administration scripts, an application can be released while the system is actively handling
calls to other applications. VXML Server will first run all application end classes for the
application and then release it from memory.
•
An application is updated. The process of updating an application prompts VXML Server to
create a new instance of the application in memory, while keeping the old instance in
memory long enough for all existing callers to complete their calls. Once all calls have
completed with the old instance, that instance’s application end classes are run.
create a new instance of the application in memory, while keeping the old instance in
memory long enough for all existing callers to complete their calls. Once all calls have
completed with the old instance, that instance’s application end classes are run.
An application end class only has access to the Global API, which allows for the creation of
global and application data. It does not have access to the Session API because it is not run
within a call session and is associated only with an application, not a call.
global and application data. It does not have access to the Session API because it is not run
within a call session and is associated only with an application, not a call.
The main purpose for an application end class would be to perform cleanup operations for an
application. Typically this would involve closing database connections or files that were opened
application. Typically this would involve closing database connections or files that were opened