Cisco Cisco Unified Customer Voice Portal 11.0(1) Developer's Guide

Page of 79
C
HAPTER 
2:
 
C
ISCO 
CVP
 
V
OICE
XML
 API Introduction
   
C
ISCO 
CVP V
OICE
XML 3.1
 
 
  
Programmer 
Guide 
 
component and CVP VoiceXML Server. The classes in the Session API are organized into a 
hierarchy where the classes for each component add unique capabilities to the common base with 
regards to what data is available to it and what it is allowed to modify. 
When building a component, the design requires the component to implement a single execution 
method CVP VoiceXML Server uses to access the component. This method can be seen as the 
“main” method for that component, it is where the Server leaves its context and enters the 
component’s. It is this execution method that receives as a parameter a class belonging to the 
Session API  to provide the component access to environment information. 
The execution method is used exclusively by CVP VoiceXML Server. Two components, custom 
configurable elements and Say It Smart plugins, require integration with CVP VoiceXML 
Studio. For those components, the API additionally requires methods that define how to render 
it.  
For those components that need to produce VoiceXML (primarily configurable voice elements 
and hotevents), Cisco CVP VoiceXML provides another set of Java API classes called the Voice 
Foundation Classes (VFCs). These classes act as an abstraction layer to VoiceXML and allow 
CVP VoiceXML components to work seamlessly on any supported voice browser. Building 
VoiceXML using the VFCs is very much like building VoiceXML statically, except in a Java 
environment. 
The API Javadocs contain detailed descriptions for each of the classes in the Java API, including 
the Session API and the VFCs. Additionally, refer to Audium Support Center 
(
) to find example source code for various components. 
Design Considerations 
A few notes on CVP VoiceXML Server and how it interacts with custom components written in 
Java is warranted. This information is important to keep in mind since how a developer 
approaches the design of the components they wish to build is impacted by them: 
• 
Each application is run by the Server in its own separate classloader. The classloader’s focus 
includes all Java classes found in the local application’s 
java
 folder, all classes found in 
Server’ 
common
 folder, and the other classes available in the application server’s 
CLASSPATH
The advantage of this approach is that developers need only worry about class name conflicts 
within an individual application. One consequence, however, is that static class variables are 
static only within each application, even if they appear in classes stored in 
common
Additionally, when an application is updated, a new classloader is created for the application, 
replacing the previous one. This is not a problem unless dealing with static variables, which 
would be reset once the application is updated. While knowledge of classloaders is not 
required in order to know how to build custom components, it can be useful to understand 
how classloaders work in Java to understand how custom component code integrates with the 
Server. 
 
 
Copyright 2001 - 2005 Audium Corporation.  All Rights Reserved. 10/05
 
11