Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.base
Class PresenceProxy

java.lang.Object
  extended by com.jivesoftware.base.PresenceProxy
All Implemented Interfaces:
Presence

public class PresenceProxy
extends java.lang.Object
implements Presence

Protection proxy for the Presence class.


Field Summary
 
Fields inherited from interface com.jivesoftware.base.Presence
STATUS_AWAY, STATUS_IDLE, STATUS_INVISIBLE, STATUS_ONLINE
 
Constructor Summary
PresenceProxy(Presence presence, AuthToken authToken, Permissions permissions)
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PresenceProxy

public PresenceProxy(Presence presence,
                     AuthToken authToken,
                     Permissions permissions)
Method Detail

getID

public java.lang.String getID()
Description copied from interface: Presence
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.

Specified by:
getID in interface Presence
Returns:
the unique ID for the presence.

getUsername

public java.lang.String getUsername()
Description copied from interface: Presence
Returns the unique username for this status.

Specified by:
getUsername in interface Presence
Returns:
the unique ID for the presence.

getUser

public User getUser()
Description copied from interface: Presence
Return the user owning the presence.

Specified by:
getUser in interface Presence
Returns:
the presence owner.

getIPAddress

public java.lang.String getIPAddress()
Description copied from interface: Presence
Returns the IP address of the user.

Specified by:
getIPAddress in interface Presence
Returns:
the IP address of the user.

getLoginTime

public java.util.Date getLoginTime()
Description copied from interface: Presence
Return the time when the presence was created.

Specified by:
getLoginTime in interface Presence
Returns:
the time when the presence was created.

getLastUpdateTime

public java.util.Date getLastUpdateTime()
Description copied from interface: Presence
Return the time when the presence was last updated (when the user last visited).

Specified by:
getLastUpdateTime in interface Presence
Returns:
the time when the presence was last updated (when the user last visited).

setLastUpdateTime

public void setLastUpdateTime(java.util.Date time)
                       throws UnauthorizedException
Description copied from interface: Presence
Set the time when the presence was last updated (when the user last visited).

Specified by:
setLastUpdateTime in interface Presence
Parameters:
time - the time of the last update.
Throws:
UnauthorizedException - if not the user or an admin.

setLastUpdateTime

public void setLastUpdateTime(long time)
                       throws UnauthorizedException
Description copied from interface: Presence
Sets the time when the presence was last updated (when the user last visited).

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

getStatus

public int getStatus()
Description copied from interface: Presence
Returns the status of the presence.

Specified by:
getStatus in interface Presence
Returns:
the status of the presence.

setStatus

public void setStatus(int status)
               throws UnauthorizedException
Description copied from interface: Presence
Sets the status of the user.

Specified by:
setStatus in interface Presence
Parameters:
status - the status of the user.
Throws:
UnauthorizedException

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.