Cisco Cisco Customer Voice Portal Downloads 開発者ガイド
C
HAPTER
16:
A
PPLICATION
M
ANAGEMENT
API
P
ROGRAMMING
G
UIDE FOR
C
ISCO
U
NIFIED
CVP
VXML
S
ERVER
AND
C
ISCO
U
NIFIED
C
ALL
S
TUDIO
R
ELEASE
4.1(1)
83
Custom beans that directly implement AudiumManagementBeanInterface but do not
extend any of the following abstract classes will be loaded but not registered
when VXML Server starts up: AbstractApplicationCommand,
AbstractApplicationConfig, AbstractApplicationData, AbstractGlobalCommand,
extend any of the following abstract classes will be loaded but not registered
when VXML Server starts up: AbstractApplicationCommand,
AbstractApplicationConfig, AbstractApplicationData, AbstractGlobalCommand,
AbstractGlobalConfig, AbstractGlobalData,
and
AbstractCallServicesInfo.
This type of bean should register itself to the management server and will not have access to the
information provided by VXML Server. VXML Server only loads these beans.
Note that the standard VXML Server logging mechanism does not pick up errors or exceptions
that happen in a custom bean and the developer is responsible for handling the errors themselves
or let them propagate to the JMX console.
that happen in a custom bean and the developer is responsible for handling the errors themselves
or let them propagate to the JMX console.
Management Bean Samples
This section describes how typical bean can be created based on the VXML Server management
system API.
system API.
1)
Create the bean interface where it defines the attributes and operations it will manage. For
example,
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{
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
provided by
VXML Server. For example, a bean class that extends
AbstractGlobalData
can call
getAllDataNames(), removeAllData(), getData()
, etc. These methods are
made accessible when the bean gets loaded.