public class SubscribeForm extends Form
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.
| Constructor and Description |
|---|
SubscribeForm(DataForm.Type formType) |
SubscribeForm(DataForm configDataForm) |
SubscribeForm(Form subscribeOptionsForm) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
List<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. |
addField, createAnswerForm, getDataFormToSend, getField, getFields, getFormFrom, getInstructions, getTitle, getType, setAnswer, setAnswer, setAnswer, setAnswer, setAnswer, setAnswer, setAnswer, setDefaultAnswer, setInstructions, setTitlepublic SubscribeForm(DataForm configDataForm)
public SubscribeForm(Form subscribeOptionsForm)
public SubscribeForm(DataForm.Type formType)
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 List<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