|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Parameterable
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.
Method Summary | |
---|---|
java.lang.Object |
clone() Returns a clone of this Parameterable . |
boolean |
equals(java.lang.Object o) Compares the given Parameterable with this one. |
java.lang.String |
getParameter(java.lang.String key) Returns the value of the named parameter, or null if it is not set. |
java.util.Iterator<java.lang.String> |
getParameterNames() Returns an Iterator of the names of all parameters contained in this object. |
java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.String>> |
getParameters() Returns a Collection view of the parameter name-value mappings contained in this Parameterable. |
java.lang.String |
getValue() Returns the field value as a string. |
void |
removeParameter(java.lang.String name) Removes the named parameter from this object. |
void |
setParameter(java.lang.String name, java.lang.String value) Sets the value of the named parameter. |
void |
setValue(java.lang.String value) Set the value of the field. |
Method Detail |
---|
java.lang.String getValue()
void setValue(java.lang.String value)
value
- the new header field value, not including parametersjava.lang.IllegalStateException
- if the header field cannot be modified for this objectjava.lang.NullPointerException
- if the value parameter is nulljava.lang.String getParameter(java.lang.String key)
String
indicates a flag parameter.key
- a String
specifying the parameter namejava.lang.NullPointerException
- if key is nullvoid setParameter(java.lang.String name, java.lang.String value)
removeParameter(String)
name
- parameter namevalue
- new parameter valuejava.lang.IllegalStateException
- if parameters cannot be modified for this objectjava.lang.NullPointerException
- if name parameter is nullvoid removeParameter(java.lang.String name)
name
- parameter namejava.lang.IllegalStateException
- if parameters cannot be modified for this objectjava.lang.NullPointerException
- if name is nulljava.util.Iterator<java.lang.String> getParameterNames()
Iterator
of the names of all parameters contained in this object. The order is the order of appearance of the parameters in the Parameterable.Iterator
of String
objects that are the names of the parameters contained in this objectjava.util.Set<java.util.Map.Entry<java.lang.String,java.lang.String>> getParameters()
Set
of Map.Entry
objects that are the parameters on this Parameterable.java.lang.Object clone()
Parameterable
. The cloned Parameterable
has identical field value and parameters.Parameterable
boolean equals(java.lang.Object o)
As Parameterables consist of a field-value and an optional set of name-value parameters, the following rules should be used for comparing them:
String
comparison should be used.equals
in class java.lang.Object
o
- given Parameterable to be compared with this.true
if the two Parameterable are deemed equal.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1996, 2010, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
Java SIP Servlet API 1.1 Reference
Part Number E17883-01