Java API
As described previously, every Unified CVP component is constructed by implementing a Java interface or extending a Java class and overriding a single method. One argument to this method is a Unified CVP-specified Java class that acts as the API to the session. Methods in this class are used to get or change information stored in the session, such as element or session data.
A different API class
is used depending on the component. All API classes are derived from the base
class
APIBase
, though all non-logger API classes directly
extend
ComponentAPI
(both are found in the
com.audium.server.session
package).
APIBase
defines information retrieval functions any
component accessed within a call session can use, such as:
-
Obtaining telephony information such as the ANI and DNIS.
-
Obtaining application setting data such as the gateway adapter name, default audio path, maintainer, etc.
-
Getting element or session data created by components run prior to the current component.
-
Retrieving a list of elements and the exit states encountered by the caller prior to the current component.
-
Obtaining information on where the current application resides in order to aid in the loading of custom content found there.
ComponentAPI
adds to
this the ability to alter some environment settings:
-
Getting access to the User Management system, allowing the component to create, modify, or query information on users.
-
Creating session data. This class does not allow the creation of element data because only elements can do so (the start of call class cannot, for example).
-
Adding custom content to the activity log and warnings to the error log.
-
Triggering custom logging events and warning events that are picked up by loggers.
-
Setting the maintainer, default audio path, application language and encoding, as well as the call’s session timeout. At any point in the application, these settings can be changed.
-
Accessing the Global API to get and set application and global data (See User Guide for Cisco Unified CVP VXML Server and Unified Call Studio for more information on application and global data).
The following bullets
list the API classes that are used for various components (also found in the
com.audium.server.session
package). A detailed
description of what each class provides is given in the individual section for
that component.
-
CallStartAPI – This class is sent as an argument to the start of call class.
-
CallEndAPI – This class is sent as an argument to the end of call class.
-
ElementAPI – This class is used by all standard and configurable element classes as well as dynamic configuration classes. The following classes extend
ElementAPI
to provide additional functionality required for different kinds of elements.-
ActionAPI / ActionElementData – The
ActionAPI
class is used by generic action element classes and is extended byActionElementData
which is used by configurable action element classes. -
DecisionElementData – This class is used by configurable decision element classes.
-
VoiceElementData – This class is used by configurable voice element classes.
-
-
LoggerAPI – This class is sent as an argument to a logger’s method for handling a session-specific logging event.