JAIN SIP API
v1.1 - 23rd June 2003

javax.sip.address
Interface Address

All Superinterfaces:
java.lang.Cloneable, java.io.Serializable

public interface Address
extends java.lang.Cloneable, java.io.Serializable

This interface represents a user's display name and URI address. The display name of an address is optional but if included can be displayed to an end-user. The address URI (most likely a SipURI) is the user's address. For example a 'To' address of To: Bob sip:duke@jcp.org would have a display name attribute of Bob and an address of sip:duke@jcp.org.

See Also:
SipURI, TelURL

Method Summary
 boolean equals(java.lang.Object obj)
          Indicates whether some other Object is "equal to" this Address.
 java.lang.String getDisplayName()
          Gets the display name of this Address, or null if the attribute is not set.
 URI getURI()
          Returns the URI of this Address.
 boolean isWildcard()
          This determines if this address is a wildcard address.
 void setDisplayName(java.lang.String displayName)
          Sets the display name of the Address.
 void setURI(URI uri)
          Sets the URI of this Address.
 java.lang.String toString()
          Returns a string representation of this Address.
 

Method Detail

setDisplayName

public void setDisplayName(java.lang.String displayName)
                    throws java.text.ParseException
Sets the display name of the Address. The display name is an additional user friendly personalized text that accompanies the address.

Parameters:
displayName - - the new string value of the display name.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the displayName value.

getDisplayName

public java.lang.String getDisplayName()
Gets the display name of this Address, or null if the attribute is not set.

Returns:
the display name of this Address

setURI

public void setURI(URI uri)
Sets the URI of this Address. The URI can be either a TelURL or a SipURI.

Parameters:
uri - - the new URI value of this Address.

getURI

public URI getURI()
Returns the URI of this Address. The type of URI can be determined by the scheme.

Returns:
URI parmater of the Address object

toString

public java.lang.String toString()
Returns a string representation of this Address.

Overrides:
toString in class java.lang.Object
Returns:
the stringified representation of the Address

equals

public boolean equals(java.lang.Object obj)
Indicates whether some other Object is "equal to" this Address. The actual implementation class of a Address object must override the Object.equals method. The new equals method must ensure that the implementation of the method is reflexive, symmetric, transitive and for any non null value X, X.equals(null) returns false.

Overrides:
equals in class java.lang.Object
Parameters:
obj - - the Object with which to compare this Address
Returns:
true if this Address is "equal to" the object argument and false otherwise.
See Also:
Object

isWildcard

public boolean isWildcard()
This determines if this address is a wildcard address. That is ((SipURI)Address.getURI()).getUser() == *;. This method is specific to SIP and SIPS schemes.

Returns:
true if this address is a wildcard, false otherwise.

JAIN SIP API
v1.1 - 23rd June 2003

If you have any comments, please mail them to JAIN-SIP-INTEREST@java.sun.com after subscribing to the
JAIN-SIP-Interest list at http://archives.java.sun.com
Copyright - 2003 Sun Microsystems