javax.emb
Class ProtocolConstraints

java.lang.Object
  extended byjavax.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:

See Also:
Serialized Form

Field Summary
static java.lang.String CLIENT_TYPE
           
static java.lang.String SERVER_TYPE
           
 
Constructor Summary
ProtocolConstraints()
           
 
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
 

Field Detail

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)
Constructor Detail

ProtocolConstraints

public ProtocolConstraints()
Method Detail

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.