|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SipURI
Represents sip and sips URIs. SIP and SIPS URIs are used for addressing. They are similar to email addresses in that they are of the form user@host where user is either a user name or telephone number, and host is a host or domain name, or a numeric IP address. Additionally, SIP and SIPS URIs may contain parameters and headers (although headers are not legal in all contexts). Syntactically, SIP and SIPS URIs are identical except for the name of URI scheme. The semantics differs in that the SIPS scheme implies that the identified resource is to be contacted using TLS. The following quote is from RFC 3261: Because sip and sips URIs are syntactically identical and because they're used the same way, they're both represented by the SipURI interface. The string form of SIP and SIPS URIs may contain escaped characters. The SIP servlet container is responsible for unescaping those characters before presenting URIs to servlets. Likewise, string values passed to setters for various SIP(S) URI components may contain reserved or excluded characters that need escaping before being used. The container is responsible for escaping those values. See Also:Address, SipFactory.createSipURI(java.lang.String, java.lang.String), SipServletRequest.getRequestURI()
| Method Summary | |
|---|---|
boolean |
equals(Object o)
Compares the given SipURI with this SipURI. |
String |
getHeader(String name)
Returns the value of the specified header. |
Iterator<String> |
getHeaderNames()
Returns an Iterator over the names of all headers present in this SipURI. |
String |
getHost()
Returns the host part of this SipURI. |
boolean |
getLrParam()
Returns true if the "lr" flag parameter is set, and false otherwise. |
String |
getMAddrParam()
Returns the value of the "maddr" parameter, or null if this is not set. |
String |
getMethodParam()
Returns the value of the "method" parameter, or null if this is not set. |
int |
getPort()
Returns the port number of this SipURI, or -1 if this is not set. |
String |
getTransportParam()
Returns the value of the "transport" parameter, or null if this is not set. |
int |
getTTLParam()
Returns the value of the "ttl" parameter, or -1 if this is not set. |
String |
getUser()
Returns the user part of this SipURI. |
String |
getUserParam()
Returns the value of the "user" parameter, or null if this is not set. |
String |
getUserPassword()
Returns the password of this SipURI, or null if this is not set. |
boolean |
isSecure()
Returns true if this SipURI is secure, that is, if this it represents a sips URI. |
void |
removeHeader(String name)
Removes the value of the specified header in this SipURI. |
void |
setHeader(String name,
String value)
Sets the value of the specified header in this SipURI. |
void |
setHost(String host)
Sets the host part of this SipURI. |
void |
setLrParam(boolean flag)
Sets or removes the "lr" parameter depending on the value of the flag. |
void |
setMAddrParam(String maddr)
Sets the value of the "maddr" parameter. |
void |
setMethodParam(String method)
Sets the value of the "method" parameter. |
void |
setPort(int port)
Sets the port number of this SipURI. |
void |
setSecure(boolean b)
Sets the scheme of this URI to sip or sips depending on whether the argument is true or not. |
void |
setTransportParam(String transport)
Sets the value of the "transport" parameter. |
void |
setTTLParam(int ttl)
Sets the value of the "ttl" parameter. |
void |
setUser(String user)
Sets the user part of this SipURI. |
void |
setUserParam(String user)
Sets the value of the "user" parameter. |
void |
setUserPassword(String password)
Sets the password of this SipURI. |
String |
toString()
Returns the String representation of this SipURI. |
| Methods inherited from interface javax.servlet.sip.URI |
|---|
clone, getParameter, getParameterNames, getScheme, isSipURI, removeParameter, setParameter |
| Method Detail |
|---|
boolean equals(Object o)
equals in interface URIequals in class ObjectString getHeader(String name)
Iterator<String> getHeaderNames()
String getHost()
boolean getLrParam()
String getMAddrParam()
String getMethodParam()
int getPort()
String getTransportParam()
int getTTLParam()
String getUser()
String getUserParam()
String getUserPassword()
boolean isSecure()
void removeHeader(String name)
name - header name
void setHeader(String name,
String value)
void setHost(String host)
void setLrParam(boolean flag)
void setMAddrParam(String maddr)
void setMethodParam(String method)
void setPort(int port)
void setSecure(boolean b)
void setTransportParam(String transport)
void setTTLParam(int ttl)
void setUser(String user)
void setUserParam(String user)
void setUserPassword(String password)
String toString()
toString in interface URItoString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||