The
ApplicationProperties class represents
the properties of the environment in which the application will be
run, for example, locale. It is required to create the
WVR object
which represents the base
Blueworx Voice Response system.
The
ApplicationProperties class contains
the following properties, each with
get and
set methods,
as appropriate:
- applicationName: the application name
by which the application will be known in the configuration file (the
name that is linked to the phone number or line number for incoming
calls). Default is an empty String.
- nodeName: the name of the voice response node,
as specified in the NodeName configuration entry in the configuration
file. The default is Node1.
- ipAddress: the name or address by which
the voice response node is
known to the network. The default is 127.0.0.1 (the local system).
- rmiPortNumber: the port number that
the voice response node uses
for the RMI registry. Make sure this matches the RMIPortNumber value
in the HostName configuration entry in the
configuration file. The default is 26924.
- locale: the locale for the application,
in the form of a java.util.Locale object.
Determines the default language and region of all voice segments in
the application. For more information about the application locale
see Setting the application locale.
- recoDefinitions: the speech
recognition technology to use in this application, if different from
the RecoDefinitions set in the NodeName configuration
entry in the configuration file.
- ttsDefinitions: the Text-To-Speech technology
to use in this application, if different from the TTSDefinitions set
in the NodeName configuration entry in the
configuration file.
- parameters: a Hashtable containing
the application parameters. Application parameters allow values to
be passed to the application. The hashtable uses the parameter name
as the key. All parameter values must be strings.
You can create the
ApplicationProperties object
using the above properties as parameters, in the order above. Alternatively,
you can create the object with default properties, and then set any
properties you need to change according to your particular environment.
For example:
public class MyVoiceApp extends WVRApplication {
public void voiceMain() throws WVRException {
// Create the application properties object
ApplicationProperties appProperties = new ApplicationProperties();
// Change some of the properties to match this particular environment
applicationProperties.setApplicationName("app1");
applicationProperties.setLocale(Locale.US);
.
.
.
}
.
.
.
}
Note: If an application is to be run as a managed application , the
ApplicationProperties are
set automatically according to the entries in the configuration file
default.cff,
and made available by the
WVRApplication.getApplicationProperties() method.
See
also Setting the application environment.