Cisco Cisco Customer Voice Portal Downloads 发行公告
C
HAPTER
10:
A
PPLICATION
S
TART
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)
65
Chapter 10: Application Start Classes
Application start classes are unlike most components in that they are not related to a call session.
Application start classes are instead associated with a particular application and are executed
when the application itself is initialized or updated. Currently, only the Java API can construct
code to run when an application starts.
Application start classes are instead associated with a particular application and are executed
when the application itself is initialized 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 start 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 start class that stores
information that can then be referenced by subsequent start 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 start class that stores
information that can then be referenced by subsequent start of application classes.
The application settings can specify that an error on a particular application start class will cancel
the application’s deployment. This is an optional attribute and by default the system will not
allow an error in one of these classes to stop the application deployment. If set, an error
encountered in the class will stop the application from being deployed, an error message will
appear in the application server console, and an error event will be thrown to be logged by any
error loggers. This attribute is provided should an application require its application start class to
run without error for calls the application to succeed.
the application’s deployment. This is an optional attribute and by default the system will not
allow an error in one of these classes to stop the application deployment. If set, an error
encountered in the class will stop the application from being deployed, an error message will
appear in the application server console, and an error event will be thrown to be logged by any
error loggers. This attribute is provided should an application require its application start class to
run without error for calls the application to succeed.
There are four situations where the application start class is run:
•
The application server is launched. VXML Server is configured to begin initializing
applications once it is loaded by the application server. This process triggers each
application’s start classes to be run.
applications once it is loaded by the application server. This process triggers each
application’s start classes to be run.
•
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 the VXML Server
will prompt it to start the application loading process 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 the VXML Server
will prompt it to start the application loading process just like an application server restart.
•
An application is deployed after the VXML Server has started. Using the deployment
administration scripts, an application can be deployed while the system is actively handling
calls to other applications. When the application is loaded, the application start classes will
be run.
administration scripts, an application can be deployed while the system is actively handling
calls to other applications. When the application is loaded, the application start classes will
be run.
•
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. The new application must
initialize itself, including calling all application start classes.
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. The new application must
initialize itself, including calling all application start classes.
An application start 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.