net.jxta.protocol
Class PresenceAdvertisement

java.lang.Object
  |
  +--net.jxta.document.Advertisement
        |
        +--net.jxta.protocol.PresenceAdvertisement
Direct Known Subclasses:
PresenceAdv

public abstract class PresenceAdvertisement
extends net.jxta.document.Advertisement

An abstract class defining an advertisement containing the elements used to describe a user's presence status. A user is assumed to be uniquely described by their email address.


Field Summary
 
Fields inherited from class net.jxta.document.Advertisement
expiration
 
Constructor Summary
PresenceAdvertisement()
           
 
Method Summary
static java.lang.String getAdvertisementType()
          Returns the advertisement type for the advertisement's document.
 java.lang.String getEmailAddress()
          Returns the email address String describing the user whose presence status is described by this advertisement.
 net.jxta.id.ID getID()
          Returns a unique identifier for this document.
 java.lang.String getName()
          Returns the simple name for the user described by this advertisement.
 java.lang.String getPeerID()
          Returns the peer ID of the user described by this advertisement.
 int getPresenceStatus()
          Returns the presence status information of the user described by this advertisement.
 void setEmailAddress(java.lang.String emailAddress)
          Sets the email address String describing the user whose presence status is described by this advertisement.
 void setName(java.lang.String name)
          Sets the simple name for the user described by this advertisement.
 void setPeerID(java.lang.String peerID)
          Sets the peer ID identifying the peer's location on the P2P network.
 void setPresenceStatus(int presenceStatus)
          Sets the presence status informtion of the user described by this advertisement.
 
Methods inherited from class net.jxta.document.Advertisement
clone, getDocument, getLocalExpirationTime
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PresenceAdvertisement

public PresenceAdvertisement()
Method Detail

getAdvertisementType

public static java.lang.String getAdvertisementType()
Returns the advertisement type for the advertisement's document.

Returns:
the advertisement type String.

getEmailAddress

public java.lang.String getEmailAddress()
Returns the email address String describing the user whose presence status is described by this advertisement.

Returns:
the email address for the advertisement.

getID

public net.jxta.id.ID getID()
Returns a unique identifier for this document. As there is none for this advertisement type, this method returns the null ID.

Specified by:
getID in class net.jxta.document.Advertisement
Returns:
the null ID.

getName

public java.lang.String getName()
Returns the simple name for the user described by this advertisement.

Returns:
the user's name.

getPeerID

public java.lang.String getPeerID()
Returns the peer ID of the user described by this advertisement.

Returns:
the peer ID of the user.

getPresenceStatus

public int getPresenceStatus()
Returns the presence status information of the user described by this advertisement.

Returns:
the user's status information.

setEmailAddress

public void setEmailAddress(java.lang.String emailAddress)
Sets the email address String describing the user whose presence status is described by this advertisement.

Parameters:
emailAddress - the email address for the advertisement.

setName

public void setName(java.lang.String name)
Sets the simple name for the user described by this advertisement.

Parameters:
name - the user's name.

setPeerID

public void setPeerID(java.lang.String peerID)
Sets the peer ID identifying the peer's location on the P2P network.

Parameters:
peerID - the peer ID for the advertisement.

setPresenceStatus

public void setPresenceStatus(int presenceStatus)
Sets the presence status informtion of the user described by this advertisement.

Parameters:
presenceStatus - the user's status information.