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>
public class AffiliationTask extends NodeTask
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:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.jivesoftware.openfire.pubsub.cluster.NodeTask
nodeId, serviceId, uniqueNodeIdentifier
-
-
Constructor Summary
Constructors Constructor Description AffiliationTask()
This 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NodeAffiliate.Affiliation
getAffiliation()
The new affiliation with a pubsub node.org.xmpp.packet.JID
getJID()
Provides the address of the entity that has a new affiliation with a pubsub node.void
readExternal(ObjectInput in)
void
run()
String
toString()
void
writeExternal(ObjectOutput out)
-
Methods inherited from class org.jivesoftware.openfire.pubsub.cluster.NodeTask
getNodeId, getNodeIfLoaded, getResult, getServiceIfLoaded, getUniqueNodeIdentifier
-
-
-
-
Constructor Detail
-
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 Detail
-
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
public NodeAffiliate.Affiliation getAffiliation()
The new affiliation with a pubsub node.- Returns:
- a pubsub node affiliation.
-
run
public void run()
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Overrides:
writeExternal
in classNodeTask
- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Overrides:
readExternal
in classNodeTask
- Throws:
IOException
ClassNotFoundException
-
-