Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.base
Interface Presence

All Known Implementing Classes:
DbPresence, PresenceProxy

public interface Presence

A Presence encapsulates information relating to the owning user such as login time, status and last update time.


Field Summary
static int STATUS_AWAY
           
static int STATUS_IDLE
           
static int STATUS_INVISIBLE
           
static int STATUS_ONLINE
           
 
Method Summary
 java.lang.String getID()
          Returns the unique ID for this status.
 java.lang.String getIPAddress()
          Returns the IP address of the user.
 java.util.Date getLastUpdateTime()
          Return the time when the presence was last updated (when the user last visited).
 java.util.Date getLoginTime()
          Return the time when the presence was created.
 int getStatus()
          Returns the status of the presence.
 User getUser()
          Return the user owning the presence.
 java.lang.String getUsername()
          Returns the unique username for this status.
 void setLastUpdateTime(java.util.Date time)
          Set the time when the presence was last updated (when the user last visited).
 void setLastUpdateTime(long time)
          Sets the time when the presence was last updated (when the user last visited).
 void setStatus(int status)
          Sets the status of the user.
 

Field Detail

STATUS_ONLINE

static final int STATUS_ONLINE
See Also:
Constant Field Values

STATUS_IDLE

static final int STATUS_IDLE
See Also:
Constant Field Values

STATUS_INVISIBLE

static final int STATUS_INVISIBLE
See Also:
Constant Field Values

STATUS_AWAY

static final int STATUS_AWAY
See Also:
Constant Field Values
Method Detail

getID

java.lang.String getID()
Returns the unique ID for this status. The ID in the default implmentation is the user's session ID, which is unique within a single JVM.

Returns:
the unique ID for the presence.

getUsername

java.lang.String getUsername()
Returns the unique username for this status.

Returns:
the unique ID for the presence.

getUser

User getUser()
Return the user owning the presence.

Returns:
the presence owner.

getIPAddress

java.lang.String getIPAddress()
Returns the IP address of the user.

Returns:
the IP address of the user.

getLoginTime

java.util.Date getLoginTime()
Return the time when the presence was created.

Returns:
the time when the presence was created.

getLastUpdateTime

java.util.Date getLastUpdateTime()
Return the time when the presence was last updated (when the user last visited).

Returns:
the time when the presence was last updated (when the user last visited).

setLastUpdateTime

void setLastUpdateTime(java.util.Date time)
                       throws UnauthorizedException
Set the time when the presence was last updated (when the user last visited).

Parameters:
time - the time of the last update.
Throws:
UnauthorizedException - if not the user or an admin.

setLastUpdateTime

void setLastUpdateTime(long time)
                       throws UnauthorizedException
Sets the time when the presence was last updated (when the user last visited).

Parameters:
time - the time of the last update (in milliseconds).
Throws:
UnauthorizedException - if not the user or an admin.

getStatus

int getStatus()
Returns the status of the presence.

Returns:
the status of the presence.

setStatus

void setStatus(int status)
               throws UnauthorizedException
Sets the status of the user.

Parameters:
status - the status of the user.
Throws:
UnauthorizedException

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.