|
JSR-043: JTAPI-1.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.telephony.media.ConfigSpec
Stores the information necessary to configure (or re-configure) a collection of resources. A ConfigSpec is essentially a read-only structure consisting of
A ConfigSpec object is an argument to
the bind methods
or
configure()
where it describes the requested configuration.
A ConfigSpec is also the return value from
getConfiguration()
where it describes the current configuration.
A ConfigSpec used in configure() or the bind methods is obtained using the constructor, and is not modified thereafter. A ConfigSpec returned from getConfiguration() is inspected using one of the ConfigSpec field accessor methods.
timeout
milliseconds for resources to become available. If the requested
resources are not available at that time, configuration will fail,
and the application can continue to interact with the caller using
the previously configured resources.
Note:
Timeout may be specified as
(or -1).
Other negative values for timeout may generate an IllegalArgumentException.
ResourceConstants.FOREVER
ConfigSpec attributes are also used to specify processing options
for bindAndConnect
and related methods.
The defined attributes for a ConfigSpec are described
in ConfigSpecConstants
.
|
requests the default SignalDetector, SignalGenerator, and alternating use of the default Player and Recorder |
|
requests that no reconfiguration be attempted. |
Note:
ConfigSpec.anyConfig
is identified by
(ResourceSpec[] == null).
An empty ResourceSpec[], that is:
(ResourceSpec[] = new ResourceSpec[])
indicates a configuration with no Resources.
Note:
This specification does not constrain how or whether the structured
sub-components of a ConfigSpec are shared or copied between uses.
Application developers are advised that there may be side-effects
if an Array or Dictionary used in a ConfigSpec is subsequently
modified. For example, it would be poor practice to modify
the ResourceSpec[] returned from
basicConfig.getResourceSpecs()
.
Modifications should be made only to copies of such Arrays
or Dictionaries.
FAQ:
The ConfigSpec returned from getConfiguration
is
not the same ConfigSpec used in a previous configure
.
For example, the ResourceSpec[] in the returned ConfigSpec
will contain descriptions of the Resources actually configured.
Also, the Attributes of the ConfigSpec may contain additional
attributes that were not mentioned in the ConfigSpec passed to configure.
Field Summary | |
static ConfigSpec |
anyConfig
A ConfigSpec instance that specifes that any configuration of Resources is acceptable. |
static ConfigSpec |
basicConfig
A basic ConfigSpec. |
static ConfigSpec |
emptyConfig
ConfigSpec for a MediaGroup with no Resources. |
Fields inherited from interface javax.telephony.media.ConfigSpecConstants |
a_AlertingTimeout, a_Arbitration, a_DeallocateOnIdle, a_LocalState, a_RemoteState, a_StopOnDisconnect, v_Alerting, v_Connected, v_FirstTalker, v_InProgress, v_LastTalker, v_MixTalkers |
Constructor Summary | |
ConfigSpec(ResourceSpec[] specs,
int timeout,
java.util.Dictionary attributes,
java.util.Dictionary parameters,
RTC[] rtcs)
Constructor with full range of arguments. |
|
ConfigSpec(java.lang.String configName,
int timeout,
ConfigSpec configSpec)
Copy a ConfigSpec and set the configName and timeout. |
|
ConfigSpec(java.lang.String configName,
int timeout,
ResourceSpec[] specs,
java.util.Dictionary attributes,
java.util.Dictionary parameters,
RTC[] rtcs)
Construct a ConfigSpec and set the configName. |
Method Summary | |
java.util.Dictionary |
getAttributes()
Gets the Dictionary of attributes from this ConfigSpec. |
java.lang.String |
getConfigName()
Return the String name of this ConfigSpec. |
java.util.Dictionary |
getParameters()
Gets the Dictionary of parameters from this ConfigSpec. |
ResourceSpec[] |
getResourceSpecs()
Retrieves the ResourceSpec[] from this ConfigSpec. |
RTC[] |
getRTC()
Gets the persistant RTC[] for this ConfigSpec. |
int |
getTimeout()
Returns the internal timeout value. |
java.lang.String |
toString()
Elide package name, include getConfigName(). |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final ConfigSpec emptyConfig
public static final ConfigSpec basicConfig
ResourceSpec.basicAltPlayerRecorder
,
ResourceSpec.basicSignalDetector
, and
ResourceSpec.basicSignalGenerator
.public static final ConfigSpec anyConfig
ConfigSpec.anyConfig
is identified
by (ResourceSpec[] == null)
.
Constructor Detail |
public ConfigSpec(java.lang.String configName, int timeout, ResourceSpec[] specs, java.util.Dictionary attributes, java.util.Dictionary parameters, RTC[] rtcs)
The configName is a String name that identifies this configuration.
configName
- a String to name this configSpectimeout
- int number of milliseconds to wait for resources.
configure()
should complete or abort in this time.specs
- an array of ResourceSpecattributes
- Dictionary of binding and selection attributes.parameters
- Dictionary of initial configuration parameters.rtcs
- Array of persistant RTCs.public ConfigSpec(java.lang.String configName, int timeout, ConfigSpec configSpec)
The configName is a String name that identifies this configuration.
configName
- a String to name this configSpectimeout
- int number of milliseconds to wait for resources.
configure()
should complete or abort in this time.configSpec
- use RessourceSpec[], Attributes, Parameters and RTC[] from here.public ConfigSpec(ResourceSpec[] specs, int timeout, java.util.Dictionary attributes, java.util.Dictionary parameters, RTC[] rtcs)
When specs
is null
, the ConfigSpec specifies
that anyConfig
configuration of Resources is acceptable.
If the other arguments are null
,
they are treated the same as empty collections.
specs
- an array of ResourceSpectimeout
- int number of milliseconds to wait for resources.
configure()
should complete or abort in this time.attributes
- Dictionary of binding and selection attributes.parameters
- Dictionary of initial configuration parameters.rtcs
- Array of persistant RTCs.Method Detail |
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getConfigName()
public int getTimeout()
public ResourceSpec[] getResourceSpecs()
public java.util.Dictionary getAttributes()
public java.util.Dictionary getParameters()
public RTC[] getRTC()
|
JSR-043: JTAPI-1.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |