Package rocks.xmpp.extensions.last.model
Class LastActivity
- java.lang.Object
-
- rocks.xmpp.extensions.last.model.LastActivity
-
public final class LastActivity extends Object
The implementation of the<query/>
element in thejabber:iq:last
namespace.This class is immutable.
-
-
Constructor Summary
Constructors Constructor Description LastActivity()
Creates an empty last activity instance, used for querying another entity.LastActivity(long seconds, String status)
Creates a last activity instance with a number of seconds, used as response.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Long
getSeconds()
Gets the number of seconds since the last activity.String
getStatus()
Gets the status message of the last unavailable presence received from the user, if the last activity request was a Offline User Query.String
toString()
-
-
-
Field Detail
-
NAMESPACE
public static final String NAMESPACE
jabber:iq:last- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LastActivity
public LastActivity()
Creates an empty last activity instance, used for querying another entity.
-
LastActivity
public LastActivity(long seconds, String status)
Creates a last activity instance with a number of seconds, used as response.- Parameters:
seconds
- The number of seconds since the last activity.status
- The status text.
-
-
Method Detail
-
getSeconds
public final Long getSeconds()
Gets the number of seconds since the last activity.- Returns:
- The number of seconds since the last activity.
-
getStatus
public final String getStatus()
Gets the status message of the last unavailable presence received from the user, if the last activity request was a Offline User Query.- Returns:
- The status message of the last unavailable presence received from the user or null.
-
-