javax.servlet.sip
Interface Parameterable

All Superinterfaces:
Cloneable
All Known Subinterfaces:
Address

public interface Parameterable
extends Cloneable

The Parameterable interface is used to indicate a SIP header field value with optional parameters. All of the Address header fields are Parameterable, including Contact, From, To, Route, Record-Route, and Reply-To. In addition, the header fields Accept, Accept-Encoding, Alert-Info, Call-Info, Content-Disposition, Content-Type, Error-Info, Retry-After and Via are also Parameterable.

Since:
1.1

Method Summary
 Object clone()
          Returns a clone of this Parameterable.
 boolean equals(Object o)
          Compares the given Parameterable type with this one.
 String getParameter(String key)
          Returns the value of the named parameter, or null if it is not set.
 Iterator<String> getParameterNames()
          Returns an Iterator of the names of all parameters contained in this object.
 Set<Map.Entry<String,String>> getParameters()
          Returns a Collection view of the parameter name-value mappings contained in this Parameterable.
 String getValue()
          Returns the field value as a string.
 void removeParameter(String name)
          Removes the named parameter from this object.
 void setParameter(String name, String value)
          Sets the value of the named parameter.
 void setValue(String value)
          Set the value of the field.
 

Method Detail

clone

Object clone()
Returns a clone of this Parameterable. The cloned Parameterable has identical field value and parameters.


equals

boolean equals(Object o)
Compares the given Parameterable type with this one. The comparison rules to be used for the Parameterable comparison should be taken as specified in the underlying specifications. Most of the headers of Parameterable type are defined in RFC 3261, however for others their respective specifications should be consulted for comaprison.

Overrides:
equals in class Object

getParameter

String getParameter(String key)
Returns the value of the named parameter, or null if it is not set. A zero-length String indicates a flag parameter.


getParameterNames

Iterator<String> getParameterNames()
Returns an Iterator of the names of all parameters contained in this object. The order is the order of appearance of the parameters in the Parameterable.


getParameters

Set<Map.Entry<String,String>> getParameters()
Returns a Collection view of the parameter name-value mappings contained in this Parameterable. The order is the order of appearance of the parameters in the Parameterable.


getValue

String getValue()
Returns the field value as a string.


removeParameter

void removeParameter(String name)
Removes the named parameter from this object. Nothing is done if the object did not already contain the specific parameter.


setParameter

void setParameter(String name,
                  String value)
Sets the value of the named parameter. If this object previously contained a value for the given parameter name, then the old value is replaced by the specified value. The setting of a flag parameter is indicated by specifying a zero-length String for the parameter value. Calling this method with null value is equivalent to calling


setValue

void setValue(String value)
Set the value of the field.



Copyright © 2012. All Rights Reserved.