org.echarts.servlet.sip.appRouter.DFCRouterImpl
Class OriginatingAddress

java.lang.Object
  extended by org.echarts.servlet.sip.appRouter.DFCRouterImpl.OriginatingAddress
All Implemented Interfaces:
java.io.Serializable, Address

public class OriginatingAddress
extends java.lang.Object
implements Address

This class represents an originating address as derived from a SipServletRequest. For the DFC router implementation, the originating address consists of the From header value in the SIP request message. Thus, the address includes the display-name if present, the URI, and all the parameters.

See Also:
Serialized Form

Constructor Summary
OriginatingAddress(SipServletRequest r)
           
 
Method Summary
 URI getSubscriberURI()
          Return the subscriber URI associated with this originating address.
 boolean hasChanged(java.lang.String oldAddressName)
          Determines whether this originating address differs from the string representation of another originating address passed as a parameter.
 java.lang.String toCompareString()
          Return a String that represents a version of the originating address that can be compared with other originating addresses to determine a match.
 java.lang.String toString()
          Returns a string representation of the originating address
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OriginatingAddress

public OriginatingAddress(SipServletRequest r)
Method Detail

toCompareString

public java.lang.String toCompareString()
Return a String that represents a version of the originating address that can be compared with other originating addresses to determine a match. Currently, this method removes the "tag=..." and "transport=..." parameters from the URI. A useful enhancement would be to have some properties defined somewhere that would dictate what other URI parameters, if any, that should similarly be excluded from consideration when comparing two originating addresses.

Specified by:
toCompareString in interface Address

toString

public java.lang.String toString()
Returns a string representation of the originating address

Specified by:
toString in interface Address
Overrides:
toString in class java.lang.Object

hasChanged

public boolean hasChanged(java.lang.String oldAddressName)
Determines whether this originating address differs from the string representation of another originating address passed as a parameter.

Specified by:
hasChanged in interface Address
Parameters:
oldAddressName - The string representation of an originating address that this address to be compared to
Returns:
true if this originating address has changed (is different from) the old address, otherwise false

getSubscriberURI

public URI getSubscriberURI()
Return the subscriber URI associated with this originating address.

Specified by:
getSubscriberURI in interface Address