org.cafesip.sipunit
Class PresenceDeviceInfo

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

public class PresenceDeviceInfo
extends java.lang.Object

This class represents a single Tuple element received in a NOTIFY SIP message - it contains all information about a single active device associated with the presentity (buddy, watchee). These elements are optional in a NOTIFY message. A NOTIFY message will contain the complete information known about the presence of the presentity and include all active devices for that presentity (ie, partial information is not allowed in a NOTIFY message). See RFC 3863 if you need more information.


Method Summary
 java.lang.String getBasicStatus()
          Gets the basic status for this presence device (ie, "open" or "closed").
 double getContactPriority()
          Gets the priority of this presence device, relative to others, with respect to contact preference.
 java.lang.String getContactURI()
          Gets the contact URI for this device.
 java.util.List<java.lang.Object> getDeviceExtensions()
          Gets the extensions received in the last NOTIFY message, if any, pertaining to this presence device.
 java.util.List<PresenceNote> getDeviceNotes()
          Gets the notes received in the last NOTIFY message, if any, pertaining to this presence device.
 java.lang.String getId()
          Gets the unique, arbitrary ID representing this particular presence device.
 java.util.List<java.lang.Object> getStatusExtensions()
          Gets the extensions received in the last NOTIFY message, if any, pertaining to this device's status.
 java.util.Calendar getTimestamp()
          Gets the timestamp of when this device's information was set.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getBasicStatus

public java.lang.String getBasicStatus()
Gets the basic status for this presence device (ie, "open" or "closed").

Returns:
String indicating the basic status, or null if none received.

getContactPriority

public double getContactPriority()
Gets the priority of this presence device, relative to others, with respect to contact preference. The value MUST be a decimal number between 0 and 1 inclusive with at most 3 digits after the decimal point. Higher values indicate higher priority. Examples of priority values are 0, 0.021, 0.5, 1.00. If the 'priority' attribute is omitted, applications MUST assign the contact address the lowest priority. If the 'priority' value is out of the range, applications just SHOULD ignore the value and process it as if the attribute was not present.

Returns:
A decimal number between 0 and 1 inclusive with at most 3 digits after the decimal point, or -1.0 if this attribute was not received in the NOTIFY message.

getContactURI

public java.lang.String getContactURI()
Gets the contact URI for this device.

Returns:
A string representing the contact URI of this presence device, or null if none received.

getDeviceExtensions

public java.util.List<java.lang.Object> getDeviceExtensions()
Gets the extensions received in the last NOTIFY message, if any, pertaining to this presence device.

Returns:
A list of zero or more Object.

getDeviceNotes

public java.util.List<PresenceNote> getDeviceNotes()
Gets the notes received in the last NOTIFY message, if any, pertaining to this presence device.

Returns:
A list of zero or more PresenceNote objects.

getId

public java.lang.String getId()
Gets the unique, arbitrary ID representing this particular presence device.

Returns:
A String denoting the device ID.

getStatusExtensions

public java.util.List<java.lang.Object> getStatusExtensions()
Gets the extensions received in the last NOTIFY message, if any, pertaining to this device's status.

Returns:
A list of zero or more Object.

getTimestamp

public java.util.Calendar getTimestamp()
Gets the timestamp of when this device's information was set.

Returns:
A Calendar object indicating the timestamp, or null if none received.


http://www.cafesip.org