Руководство Разработчика для Cisco Cisco Customer Voice Portal 8.0(1)

Скачать
Страница из 122
Session API
As described in the previous chapter, Unified CVP provides a mechanism for the developer to
access and change information having to do with the phone call or the session. Through this
API one can get environment information such as the phone number of the caller (ANI), the
time the call began, and application settings such as the default audio path. This API is also the
conduit for the developer to set element or session data, send custom logging events, or access
the user management system. A subset of the Session API, called the Global API provides access
to data that exists beyond individual sessions.
Any custom component built by the developer will be sent this API to interface with the session.
This section of the document describes the API and what it can be used for. Both the Java and
XML versions of this API are described. Subsequent chapters will detail the APIs used to actually
construct components.
This chapter contains the following topics:
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 execution 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:
Programming Guide for Cisco Unified CVP VXML Server and Cisco Unified Call Studio Release 8.0(1)
19
 Chapter 3