Class AffiliationTask
java.lang.Object
org.jivesoftware.openfire.pubsub.cluster.NodeTask
org.jivesoftware.openfire.pubsub.cluster.AffiliationTask
- All Implemented Interfaces:
Externalizable
,Serializable
,Runnable
,ClusterTask<Void>
Updates the affiliation of a particular entity, for a particular pubsub node.
Note that this task aims to update in-memory state only: it will not apply affiliation changes to persistent data
storage (it is assumed that the cluster node where the task originated takes responsibility for that). As a result,
this task might not apply changes if the node that is the subject of this task is currently not loaded in-memory of
the cluster node on which this task operates.
- See Also:
-
Field Summary
Fields inherited from class org.jivesoftware.openfire.pubsub.cluster.NodeTask
nodeId, serviceId, uniqueNodeIdentifier
-
Constructor Summary
ConstructorsConstructorDescriptionThis no-argument constructor is provided for serialization purposes.AffiliationTask
(Node node, org.xmpp.packet.JID jid, NodeAffiliate.Affiliation affiliation) Constructs a new task that updates the affiliation of a particular entity with a specific pubsub node. -
Method Summary
Methods inherited from class org.jivesoftware.openfire.pubsub.cluster.NodeTask
getNodeId, getNodeIfLoaded, getResult, getServiceIfLoaded, getUniqueNodeIdentifier
-
Constructor Details
-
AffiliationTask
public AffiliationTask()This no-argument constructor is provided for serialization purposes. It should generally not be used otherwise. -
AffiliationTask
public AffiliationTask(@Nonnull Node node, @Nonnull org.xmpp.packet.JID jid, @Nonnull NodeAffiliate.Affiliation affiliation) Constructs a new task that updates the affiliation of a particular entity with a specific pubsub node.- Parameters:
node
- The pubsub node that this task relates to.jid
- The address of the entity that has an affiliation with the pubsub node.affiliation
- The affiliation that the entity has with the pubsub node.
-
-
Method Details
-
getJID
public org.xmpp.packet.JID getJID()Provides the address of the entity that has a new affiliation with a pubsub node.- Returns:
- the address of an entity.
-
getAffiliation
The new affiliation with a pubsub node.- Returns:
- a pubsub node affiliation.
-
run
public void run() -
writeExternal
- Specified by:
writeExternal
in interfaceExternalizable
- Overrides:
writeExternal
in classNodeTask
- Throws:
IOException
-
readExternal
- Specified by:
readExternal
in interfaceExternalizable
- Overrides:
readExternal
in classNodeTask
- Throws:
IOException
ClassNotFoundException
-
toString
-