jain.protocol.ip.sip
Class URI

java.lang.Object
  |
  +--jain.protocol.ip.sip.URI
Direct Known Subclasses:
SipURL

public class URI
extends java.lang.Object
implements java.lang.Cloneable

This class represents a Universal Resource Identifier. A URI contains a scheme and the scheme data which, in combination, provide a means to locate a resource. This API defines one such scheme - "sip", and has a SipURL class to represent this type of URI.

Version:
0.6
See Also:
SipURL

Constructor Summary
URI(java.lang.String scheme)
          Creates a URI based on given scheme
URI(java.lang.String scheme, java.lang.String schemeData)
          Creates a URI based on given scheme and data
 
Method Summary
 java.lang.Object clone()
          Creates and returns a copy of URI
 boolean equals(URI uri)
          Indicates whether some other URI is "equal to" this one
 java.lang.String getScheme()
          Gets scheme of URI
 java.lang.String getSchemeData()
          Gets scheme data of URI
 void setScheme(java.lang.String scheme)
          Sets scheme of URI
 void setSchemeData(java.lang.String schemeData)
          Sets scheme data of URI
 java.lang.String toString()
          Gets string representation of URI
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

URI

public URI(java.lang.String scheme)
    throws java.lang.IllegalArgumentException
Creates a URI based on given scheme
Parameters:
scheme - scheme
Throws:
java.lang.IllegalArgumentException - if scheme is null or zero-length

URI

public URI(java.lang.String scheme,
           java.lang.String schemeData)
    throws java.lang.IllegalArgumentException
Creates a URI based on given scheme and data
Parameters:
scheme - scheme
schemeData - scheme data
Throws:
java.lang.IllegalArgumentException - if scheme or schemeData are null or zero-length
Method Detail

setSchemeData

public void setSchemeData(java.lang.String schemeData)
                   throws java.lang.IllegalArgumentException
Sets scheme data of URI
Parameters:
schemeData - scheme data
Throws:
java.lang.IllegalArgumentException - if schemeData is null or zero-length

toString

public java.lang.String toString()
Gets string representation of URI
Overrides:
toString in class java.lang.Object
Returns:
string representation of URI

getSchemeData

public java.lang.String getSchemeData()
Gets scheme data of URI
Returns:
scheme data of URI

setScheme

public void setScheme(java.lang.String scheme)
Sets scheme of URI
Parameters:
scheme - scheme
Throws:
java.lang.IllegalArgumentException - if scheme is null or zero-length

getScheme

public java.lang.String getScheme()
Gets scheme of URI
Returns:
scheme of URI

clone

public java.lang.Object clone()
Creates and returns a copy of URI

equals

public boolean equals(URI uri)
Indicates whether some other URI is "equal to" this one
Parameters:
uri - the URI with which to compare


If you have any comments or queries, please mail them to JAIN-SIP-interest@sun.com


Copyright - 2000 Sun Microsystems