public final class Activity extends Object
<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 String |
NAMESPACE
http://jabber.org/protocol/activity
|
| 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,
String text)
Creates an activity with a category, a specific activity and a text.
|
Activity(Category category,
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.
|
String |
getText()
Gets the text of the activity.
|
String |
toString() |
public static final String NAMESPACE
public Activity()
public Activity(Category category)
category - The category.public Activity(Category category, String text)
category - The category.text - The text.public Activity(Category category, SpecificActivity specificActivity)
category - The category.specificActivity - The specific activity.public Activity(Category category, SpecificActivity specificActivity, String text)
category - The category.specificActivity - The specific activity.text - The text.public final String getText()
public final Category getCategory()
public final SpecificActivity getSpecificActivity()
Copyright © 2014–2018 XMPP.rocks. All rights reserved.