|
Smack | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jivesoftware.smackx.Form org.jivesoftware.smackx.pubsub.SubscribeForm
public class SubscribeForm
A decorator for a Form
to easily enable reading and updating
of subscription options. All operations read or update the underlying DataForm
.
Unlike the Form
.setAnswer(XXX)} methods, which throw an exception if the field does not
exist, all SubscribeForm.setXXX methods will create the field in the wrapped form
if it does not already exist.
Field Summary |
---|
Fields inherited from class org.jivesoftware.smackx.Form |
---|
ELEMENT, NAMESPACE, TYPE_CANCEL, TYPE_FORM, TYPE_RESULT, TYPE_SUBMIT |
Constructor Summary | |
---|---|
SubscribeForm(DataForm configDataForm)
|
|
SubscribeForm(Form subscribeOptionsForm)
|
|
SubscribeForm(FormType formType)
|
Method Summary | |
---|---|
int |
getDigestFrequency()
Gets the minimum number of milliseconds between sending notification digests |
Date |
getExpiry()
Get the time at which the leased subscription will expire, or has expired. |
Iterator<PresenceState> |
getShowValues()
Gets the PresenceState for which an entity wants to receive
notifications. |
boolean |
isDeliverOn()
Determines if an entity wants to receive notifications. |
boolean |
isDigestOn()
Determines if notifications should be delivered as aggregations or not. |
boolean |
isIncludeBody()
Determines whether the entity wants to receive an XMPP message body in addition to the payload format. |
void |
setDeliverOn(boolean deliverNotifications)
Sets whether an entity wants to receive notifications. |
void |
setDigestFrequency(int frequency)
Sets the minimum number of milliseconds between sending notification digests |
void |
setDigestOn(boolean digestOn)
Sets whether notifications should be delivered as aggregations or not. |
void |
setExpiry(Date expire)
Sets the time at which the leased subscription will expire, or has expired. |
void |
setIncludeBody(boolean include)
Sets whether the entity wants to receive an XMPP message body in addition to the payload format. |
void |
setShowValues(Collection<PresenceState> stateValues)
Sets the list of PresenceState for which an entity wants
to receive notifications. |
Methods inherited from class org.jivesoftware.smackx.Form |
---|
addField, createAnswerForm, getDataFormToSend, getField, getFields, getFormFrom, getInstructions, getTitle, getType, setAnswer, setAnswer, setAnswer, setAnswer, setAnswer, setAnswer, setAnswer, setDefaultAnswer, setInstructions, setTitle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SubscribeForm(DataForm configDataForm)
public SubscribeForm(Form subscribeOptionsForm)
public SubscribeForm(FormType formType)
Method Detail |
---|
public boolean isDeliverOn()
public void setDeliverOn(boolean deliverNotifications)
deliverNotifications
- public boolean isDigestOn()
public void setDigestOn(boolean digestOn)
digestOn
- true to aggregate, false otherwisepublic int getDigestFrequency()
public void setDigestFrequency(int frequency)
frequency
- The frequency in millisecondspublic Date getExpiry()
public void setExpiry(Date expire)
expire
- The expiry datepublic boolean isIncludeBody()
public void setIncludeBody(boolean include)
include
- true to receive the message body, false otherwisepublic Iterator<PresenceState> getShowValues()
PresenceState
for which an entity wants to receive
notifications.
public void setShowValues(Collection<PresenceState> stateValues)
PresenceState
for which an entity wants
to receive notifications.
stateValues
- The list of states
|
Smack | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |