public final class Activity
extends java.lang.Object
The implementation of the <activity/>
element in the http://jabber.org/protocol/activity
namespace.
This class is immutable.Each activity has a REQUIRED general category and an OPTIONAL specific instance. One can understand each specifier as ‘[user] is [activity]’ (e.g., ‘Juliet is partying’), where the relevant value is the most specific activity provided (e.g., specifically “partying” rather than generally “relaxing”).
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAMESPACE
|
Constructor and Description |
---|
Activity()
Creates an empty activity which is used to disable publishing an activity.
|
Activity(Category category)
Creates an activity with a category.
|
Activity(Category category,
SpecificActivity specificActivity)
Creates an activity with a category and a specific activity.
|
Activity(Category category,
SpecificActivity specificActivity,
java.lang.String text)
Creates an activity with a category, a specific activity and a text.
|
Activity(Category category,
java.lang.String text)
Creates an activity with a category and text.
|
Modifier and Type | Method and Description |
---|---|
Category |
getCategory()
Gets the category.
|
SpecificActivity |
getSpecificActivity()
Gets the specific activity.
|
java.lang.String |
getText()
Gets the text of the activity.
|
java.lang.String |
toString() |
public static final java.lang.String NAMESPACE
public Activity()
Creates an empty activity which is used to disable publishing an activity.
public Activity(Category category)
Creates an activity with a category.
category
- The category.public Activity(Category category, java.lang.String text)
Creates an activity with a category and text.
category
- The category.text
- The text.public Activity(Category category, SpecificActivity specificActivity)
Creates an activity with a category and a specific activity.
category
- The category.specificActivity
- The specific activity.public Activity(Category category, SpecificActivity specificActivity, java.lang.String text)
Creates an activity with a category, a specific activity and a text.
category
- The category.specificActivity
- The specific activity.text
- The text.public final java.lang.String getText()
Gets the text of the activity.
public final Category getCategory()
Gets the category.
public final SpecificActivity getSpecificActivity()
Gets the specific activity.
public final java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2014–2019 XMPP.rocks. All rights reserved.