javax.emb
Class ProtocolConstraints
java.lang.Object
javax.emb.ProtocolConstraints
- All Implemented Interfaces:
- java.io.Serializable
- public final class ProtocolConstraints
- extends java.lang.Object
- implements java.io.Serializable
This class models constraints that restrict the selection of protocol
servers, like stream servers. Instances can contain multiple kinds of
constraints. Constraints come as type/value pairs, with the type defining
the type of constraint and the value giving the actual constraint data “
similar to a dictionary. Protocol constraints are used when publishing media
for a given protocol, see MediaEntityLocalHome.publish(’) for reference. As
streaming constraints have to be transferred over machine boundaries, the
class implements java.io.Serializable
.
This specification covers two types of constraint as binding for all
implementations:
- "CLIENT_TYPE" constrains the protocol server selection indirectly
by defining an array of protocol client types (Strings) that are running on
a client machine. Protocol servers are only eligible for selection during
publish operations if they at least support one of the given client types.
Also, the metadata generated during publish requests must be suitable for
one of these clients. Standardized values for this constraint type are:
"Quicktime" for Apple Quicktime players, "VideoCharger" for IBM VideoCharger
players, "Windows Media" for Microsoft Windows Media players, "RealPlayer"
for RealNetworks players. Additional client types may be added to this list
in future releases of this specification.
- "SERVER_TYPE" constrains the protocol server selection directly by
defining an array of protocol server types (Strings) eligible for selection
during publish requests. Standardized values for this constraint type are:
”Quicktime" for Apple Quicktime servers, "VideoCharger" for IBM VideoCharger
servers, "Windows Media" for Microsoft Windows Media services, "RealSystem"
for RealNetworks servers. Additional protocol server types may be added to
this list in future releases of this specification.
- See Also:
- Serialized Form
Method Summary |
java.lang.Object |
getConstraint(java.lang.String type)
Returns the value of the constraint defined by the given type, or null
if said constraint is not present. |
java.lang.String[] |
getConstraintTypes()
Returns the receiver's constraint types as an array of Strings. |
void |
setConstraint(java.lang.String type,
java.lang.Object value)
Alters the value of the constraint defined by the given type to the given
value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CLIENT_TYPE
public static final java.lang.String CLIENT_TYPE
- See Also:
- Constant Field Values (src)
SERVER_TYPE
public static final java.lang.String SERVER_TYPE
- See Also:
- Constant Field Values (src)
ProtocolConstraints
public ProtocolConstraints()
getConstraint
public java.lang.Object getConstraint(java.lang.String type)
- Returns the value of the constraint defined by the given type, or
null
if said constraint is not present.
- Parameters:
type
- the constraint type.
- Returns:
- the constraint value.
- Throws:
javax.emb.NullPointerException
- if the given type is null
.
setConstraint
public void setConstraint(java.lang.String type,
java.lang.Object value)
- Alters the value of the constraint defined by the given type to the given
value. Passing the constraint value
null
removes a
constraint type from the receiver if present.
- Parameters:
type
- the constraint type.value
- the constraint value.
- Throws:
java.lang.NullPointerException
- if the given type is null
.
java.lang.IllegalArgumentException
- if the constraint type given
is either "CLIENT_TYPE" or "SERVER_TYPE", and the value given is
not an array of Strings.
getConstraintTypes
public java.lang.String[] getConstraintTypes()
- Returns the receiver's constraint types as an array of Strings.
- Returns:
- an array of constraint types.