Cisco Cisco Customer Voice Portal 8.0(1) Developer's Guide

Page of 122
Management Bean Samples
This section describes how typical bean can be created based on the VXML Server management
system API.
1. Create the bean interface where it defines the attributes and operations it will manage. For
example:
public interface ApplicationConfigMBean {
    public String getDefaultAudioPath();
    public void setDefaultAudioPath(String path);
    public String getSuspendedAudioFile();
    public void setSuspendedAudioFile(String file);
 }
2. Create the bean class that implements the interface and extend the predefined abstract
class.
public class ApplicationConfig extends AbstractApplicationConfig 
implements ApplicationConfigMBean{
    public String getDefaultAudioPath() {
           return super.getDefaultAudioPath(); 
 } 
    public void setDefaultAudioPath(String path) {
           super.setDefaultAudioPath(path); 
 } 
    public String getSuspendedAudioFile() {
           return super.getSuspendedAudioFile(); 
 } 
    public void setSuspendedAudioFile(String file) {
           super.setSuspendedAudioFile(file); 
 }
}
3. By extending the predefined abstract class, a custom bean gets access to the information
provided by VXML Server. For example, a bean class that extends 
AbstractGlobalData
can call 
getAllDataNames()
removeAllData()
getData()
, and so on. These
methods are made accessible when the bean gets loaded.
Application Management Interfaces
When writing custom management beans, the public APIs are used to gain access to the runtime
information that will be provided by VXML Server. We now discuss each of these interfaces
and abstract classes in details. The following figure displays the static class structure which
corresponds to the three levels of the aforementioned information structure. The built-in
management beans are also included in the diagram to show the relationship between the APIs
and the beans.
Programming Guide for Cisco Unified CVP VXML Server and Cisco Unified Call Studio Release 8.0(1)
99
Chapter 16: Application Management API
Management Bean Samples