|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--jain.protocol.ip.sip.URI
|
+--jain.protocol.ip.sip.SipURL
This class represents a SIP URL. SipURLs are used within SIP Messages to indicate the originator (FromHeader), current destination (RequestURI) and final recipient (ToHeader) of a SIP RequestMessage, and to specify redirection addresses (ContactHeader). A SipURL can also be embedded in web pages or other hyperlinks to indicate that a particular user or service can be called via SIP. When used as a hyperlink, the SipURL indicates the use of the INVITE method.
The SipURL scheme is defined to allow setting RequestHeaders and the message-body. This corresponds to the use of mailto: URLs. It makes it possible, for example, to specify the subject, urgency or media types of calls initiated through a web page or as part of an email message.
The components of the SipURL have the following meanings:
Within a SIP Message, SipURLs are used to indicate the source and intended destination of a RequestMessage, redirection addresses and the current destination of a RequestMessage. Normally all these Headers will contain SipURLs.
SipURLs are case-insensitive. All SipURL parameters are included when comparing for equality.
InviteMessage,
RequestMessage,
FromHeader,
ToHeader| Field Summary | |
static int |
TTL_MAX
Maximum value of TTL |
static int |
TTL_MIN
Minimum value of TTL |
static int |
USER_TYPE_IP
IP User Type |
static int |
USER_TYPE_PHONE
Phone User Type |
| Constructor Summary | |
SipURL(java.net.InetAddress host)
Creates a SipURL based on given host |
|
SipURL(java.lang.String user,
java.net.InetAddress host)
Creates a SipURL based on given user and host |
|
| Method Summary | |
java.lang.Object |
clone()
Creates and returns a copy of SipURL |
boolean |
equals(SipURL sipURL)
Indicates whether some other SipURL is "equal to" this one |
java.lang.String |
getExtension(java.lang.String extension)
Gets the value of specified extension parameter in SipURL |
java.lang.String[] |
getExtensions()
Gets an array of SipURL's extension parameter names |
java.lang.String |
getHeader(java.lang.String headerName)
Gets the value of specified header in SipURL |
java.lang.String[] |
getHeaders()
Gets an array of SipURL's header names |
java.net.InetAddress |
getHost()
Gets host of SipURL |
java.lang.String |
getIsdnSubAddress()
Gets ISDN subaddress of SipURL |
java.net.InetAddress |
getMAddr()
Gets MAddr of SipURL |
java.lang.String |
getMethod()
Gets method of SipURL |
int |
getPort()
Gets port of SipURL |
java.lang.String |
getPostDial()
Gets post dial of SipURL |
java.lang.String |
getSchemeData()
Gets scheme data of SipURL |
int |
getTransport()
Gets transport of SipURL |
int |
getTTL()
Gets TTL of SipURL |
java.lang.String |
getUserName()
Gets user name of SipURL |
java.lang.String |
getUserPassword()
Gets user password of SipURL |
int |
getUserType()
Gets user type of SipURL |
boolean |
hasExtension(java.lang.String extension)
Returns boolean value indicating if SipURL has extension |
boolean |
hasExtensions()
Returns boolean value indicating if SipURL has extensions |
boolean |
hasHeader(java.lang.String headerName)
Returns boolean value indicating if SipURL has given header |
boolean |
hasHeaders()
Returns boolean value indicating if SipURL has headers |
boolean |
hasIsdnSubAddress()
Returns boolean value indicating if SipURL has ISDN subaddress |
boolean |
hasMAddr()
Returns boolean value indicating if SipURL has MAddr |
boolean |
hasMethod()
Returns boolean value indicating if SipURL has method |
boolean |
hasPort()
Returns boolean value indicating if SipURL has port |
boolean |
hasPostDial()
Returns boolean value indicating if SipURL has post dial |
boolean |
hasTransport()
Returns boolean value indicating if SipURL has transport |
boolean |
hasTTL()
Returns boolean value indicating if SipURL has TTL |
boolean |
hasUserName()
Returns boolean value indicating if SipURL has user name |
boolean |
hasUserPassword()
Returns boolean value indicating if SipURL has user password |
boolean |
hasUserType()
Returns boolean value indicating if SipURL has user type |
boolean |
isGlobal()
Returns boolean value to indicate if the SipURL has a global phone user |
void |
removeExtension(java.lang.String extension)
Removes extension from SipURL |
void |
removeExtensions()
Removes all extensions from SipURL |
void |
removeHeader(java.lang.String headerName)
Removes header from SipURL |
void |
removeHeaders()
Removes all headers from SipURL |
void |
removeIsdnSubAddress()
Removes ISDN subaddress from SipURL |
void |
removeMAddr()
Removes MAddr from SipURL |
void |
removeMethod()
Removes method from SipURL |
void |
removePort()
Removes port from SipURL |
void |
removePostDial()
Removes post dial from SipURL |
void |
removeTransport()
Removes transport from SipURL |
void |
removeTTL()
Removes TTL from SipURL |
void |
removeUserPassword()
Removes user password from SipURL |
void |
removeUserType()
Removes user type from SipURL |
void |
setExtension(java.lang.String extension,
java.lang.String value)
Sets value of extension parameterin SipURL |
void |
setGlobal(boolean global)
Sets phone user of SipURL to be global or local |
void |
setHeader(java.lang.String headerName,
java.lang.String headerValue)
Sets header of SipURL |
void |
setHost(java.net.InetAddress host)
Sets host of SipURL |
void |
setIsdnSubAddress(java.lang.String isdnSubAddress)
Sets ISDN subaddress of SipURL |
void |
setMAddr(java.net.InetAddress mAddr)
Sets MAddr of SipURL |
void |
setMethod(java.lang.String method)
Sets method of SipURL |
void |
setPort(int port)
Sets port of SipURL |
void |
setPostDial(java.lang.String postDial)
Sets post dial of SipURL |
void |
setTransport(int transport)
Sets transport of SipURL |
void |
setTTL(int ttl)
Sets TTL of SipURL |
void |
setUserName(java.lang.String userName)
Sets user name of SipURL |
void |
setUserPassword(java.lang.String userPassword)
Sets user password of SipURL |
void |
setUserType(int userType)
Sets user type of SipURL |
java.lang.String |
toString()
Gets string representation of SipURL |
| Methods inherited from class jain.protocol.ip.sip.URI |
equals,
getScheme,
setScheme,
setSchemeData |
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
public static final int USER_TYPE_IP
public static final int USER_TYPE_PHONE
public static final int TTL_MIN
public static final int TTL_MAX
| Constructor Detail |
public SipURL(java.net.InetAddress host)
throws java.lang.IllegalArgumentException
host - host
public SipURL(java.lang.String user,
java.net.InetAddress host)
throws java.lang.IllegalArgumentException
user - userhost - host| Method Detail |
public void removePort()
public boolean hasTransport()
public boolean hasMethod()
public boolean hasPort()
public boolean hasIsdnSubAddress()
public java.lang.String getIsdnSubAddress()
throws ParameterNotSetException
public boolean hasPostDial()
public java.lang.String getPostDial()
throws ParameterNotSetException
public boolean hasTTL()
public boolean hasMAddr()
public boolean hasUserType()
public boolean hasUserName()
public boolean hasUserPassword()
public boolean hasHeaders()
public boolean hasHeader(java.lang.String headerName)
public java.lang.String getUserName()
throws ParameterNotSetException
public void setUserName(java.lang.String userName)
throws java.lang.IllegalArgumentException
userName - user name
public java.lang.String getUserPassword()
throws ParameterNotSetException
public void setUserPassword(java.lang.String userPassword)
throws java.lang.IllegalArgumentException,
SipException
userPassword - user passwordpublic java.net.InetAddress getHost()
public void setHost(java.net.InetAddress host)
throws java.lang.IllegalArgumentException
host - host
public int getPort()
throws ParameterNotSetException
public void setPort(int port)
throws java.lang.IllegalArgumentException
port - port
public int getTTL()
throws ParameterNotSetException
public void setTTL(int ttl)
throws java.lang.IllegalArgumentException
ttl - TTLpublic void removeTTL()
public int getTransport()
throws ParameterNotSetException
public void setTransport(int transport)
throws java.lang.IllegalArgumentException
transport - transportpublic void removeTransport()
public int getUserType()
throws ParameterNotSetException
public void setUserType(int userType)
throws java.lang.IllegalArgumentException
userType - user typepublic void removeUserType()
public void removeUserPassword()
public void removeExtension(java.lang.String extension)
public void removeExtensions()
public void removeHeader(java.lang.String headerName)
public void removeHeaders()
public java.lang.String getMethod()
throws ParameterNotSetException
public void setMethod(java.lang.String method)
throws java.lang.IllegalArgumentException
method - method
public void setIsdnSubAddress(java.lang.String isdnSubAddress)
throws java.lang.IllegalArgumentException,
SipException
isdnSubAddress - ISDN subaddress
public void setPostDial(java.lang.String postDial)
throws java.lang.IllegalArgumentException,
SipException
postDial - post dialpublic void removeMethod()
public java.net.InetAddress getMAddr()
throws ParameterNotSetException
public void setMAddr(java.net.InetAddress mAddr)
throws java.lang.IllegalArgumentException
mAddr - MAddrpublic void removeMAddr()
public void removeIsdnSubAddress()
public void removePostDial()
public boolean hasExtensions()
public boolean hasExtension(java.lang.String extension)
public void setExtension(java.lang.String extension,
java.lang.String value)
parameter - name of extension parametervalue - value of extension parameter
public java.lang.String getExtension(java.lang.String extension)
throws ParameterNotSetException
parameter - extension parameter to retrieve
public java.lang.String[] getExtensions()
throws ParameterNotSetException
public java.lang.String getHeader(java.lang.String headerName)
throws ParameterNotSetException
headerName - header to retrieve
public java.lang.String[] getHeaders()
throws ParameterNotSetException
public void setHeader(java.lang.String headerName,
java.lang.String headerValue)
throws java.lang.IllegalArgumentException
headerName - header nameheaderValue - header valuepublic boolean equals(SipURL sipURL)
sipURL - the SipURL with which to compare
public boolean isGlobal()
throws SipException
public void setGlobal(boolean global)
throws SipException
global - boolean value indicating if phone user should be globalpublic java.lang.String toString()
public java.lang.Object clone()
public java.lang.String getSchemeData()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright - 2000 Sun Microsystems