org.cafesip.sipunit
Class SipContact

java.lang.Object
  extended by org.cafesip.sipunit.SipContact

public class SipContact
extends java.lang.Object

This class holds information pertaining to a contact URI and provides associated getter methods.


Method Summary
 javax.sip.header.ContactHeader getContactHeader()
           
 java.lang.String getDisplayName()
          The method getDisplayName() returns the display name of this contact URI.
 int getExpiry()
          The method getExpiry() returns the expiry value for this contact URI.
 java.lang.String getURI()
          The method getURI() returns the contact URI as a String.
 java.lang.String getURIScheme()
          The method getURIScheme() returns the scheme of this contact URI ("sip", "sips", etc.).
 boolean isSipURI()
          This method indicates if this contact URI has a scheme of "sip" or "sips", or not.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getContactHeader

public javax.sip.header.ContactHeader getContactHeader()
Returns:
Returns the javax.sip.header.ContactHeader.

getExpiry

public int getExpiry()
The method getExpiry() returns the expiry value for this contact URI.

Returns:
Returns the expiry in seconds. If the returned value is 0, the contact doesn't expire. If the returned value is greater than 0, it is the original value of the expiry at the time the contact URI became known - elapsed time since then has NOT been accounted for.

getDisplayName

public java.lang.String getDisplayName()
The method getDisplayName() returns the display name of this contact URI.

Returns:
Returns the contact display name, or "" if none.

getURI

public java.lang.String getURI()
The method getURI() returns the contact URI as a String. For example: sips:bob@client.biloxi.example.com.

Returns:
The contact URI as a String.

getURIScheme

public java.lang.String getURIScheme()
The method getURIScheme() returns the scheme of this contact URI ("sip", "sips", etc.).

Returns:
Returns the value of the "scheme" of the contact URI - "sip", "sips", or "tel".

isSipURI

public boolean isSipURI()
This method indicates if this contact URI has a scheme of "sip" or "sips", or not.

Returns:
true if the scheme is "sip" or "sips", false otherwise.


http://www.cafesip.org