hp.opencall.media.common
Class SIPAddress

java.lang.Object
  extended byhp.opencall.media.common.Address
      extended byhp.opencall.media.common.AddressWString
          extended byhp.opencall.media.common.SIPAddress
All Implemented Interfaces:
Cloneable

public class SIPAddress
extends hp.opencall.media.common.AddressWString

Holds SIP URI addresses as a java URI class

No wildcards supported yet

Example : sip:userinfo@hostname

Since:
OCMP 3.1

Constructor Summary
SIPAddress(String auri)
          Creates a SIPAddress from a String.
SIPAddress(URI auri)
          Creates a SIPAddress from a java URI address.
 
Method Summary
 boolean equals(Object anAddr)
          Indicates whether the two addresses are equal.
 URI getUri()
          Returns the URI of the SIP address.
 boolean greater(Address anAddress)
          Indicates whether this address is strictly greater than the passed address.
static boolean isSIPUri(URI auri)
          Check if an URI is a SIP one
static URI parseString(String value)
          Check if a String can be used to build an URI
 String toString()
          Returns the String of the SIP address.
 
Methods inherited from class hp.opencall.media.common.Address
hashCode, overlap
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SIPAddress

public SIPAddress(String auri)
           throws InvalidAddressFormat
Creates a SIPAddress from a String.


SIPAddress

public SIPAddress(URI auri)
           throws InvalidAddressFormat
Creates a SIPAddress from a java URI address.

Method Detail

greater

public boolean greater(Address anAddress)
Description copied from class: Address
Indicates whether this address is strictly greater than the passed address.

Assumes that hashCode always returns different values for different Class objects.


equals

public boolean equals(Object anAddr)
Description copied from class: Address
Indicates whether the two addresses are equal.

Can compare two (non wildcard) addresses or an address and a wildcard.


getUri

public URI getUri()
Returns the URI of the SIP address.

Returns:
the URI as a java URI type.

toString

public String toString()
Returns the String of the SIP address.

Returns:
the URI as a String

parseString

public static URI parseString(String value)
                       throws InvalidAddressFormat
Check if a String can be used to build an URI

Returns:
the URI if possible
Throws:
InvalidAddressFormat - if not possible

isSIPUri

public static boolean isSIPUri(URI auri)
Check if an URI is a SIP one

Returns:
a boolean true/false