Package tigase.cluster.api
Interface CommandListener
-
- All Superinterfaces:
java.lang.Comparable<CommandListener>
- All Known Implementing Classes:
AmpComponentClustered.PacketForwardCommand,CommandListenerAbstract,PacketForwardCmd
public interface CommandListener extends java.lang.Comparable<CommandListener>
- Author:
- Artur Hefczyc Created Mar 16, 2011
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidexecuteCommand(JID fromNode, java.util.Set<JID> visitedNodes, java.util.Map<java.lang.String,java.lang.String> data, java.util.Queue<Element> packets)Method is responsible for executing commands from other nodes and appropriate processingjava.lang.StringgetName()Method allows retrieval name of the particular commandPrioritygetPriority()Method returns priority of particular command which should be used to assign proper priority for processing of this commandvoidgetStatistics(StatisticsList list)Method allows retrieval possible statistics for particular commandvoidsetName(java.lang.String name)Method allows setting name of the command
-
-
-
Method Detail
-
executeCommand
void executeCommand(JID fromNode, java.util.Set<JID> visitedNodes, java.util.Map<java.lang.String,java.lang.String> data, java.util.Queue<Element> packets) throws ClusterCommandException
Method is responsible for executing commands from other nodes and appropriate processing- Parameters:
fromNode- address of the node from which command was receivedvisitedNodes- collection of already visited nodesdata- additional data associated with the command in addition to the mainElementpackets- collection ofElementcommands to be executed- Throws:
ClusterCommandException- execution exception
-
getName
java.lang.String getName()
Method allows retrieval name of the particular command- Returns:
- a value of
Stringname of the command
-
setName
void setName(java.lang.String name)
Method allows setting name of the command- Parameters:
name- to be used
-
getPriority
Priority getPriority()
Method returns priority of particular command which should be used to assign proper priority for processing of this command
-
getStatistics
void getStatistics(StatisticsList list)
Method allows retrieval possible statistics for particular command- Parameters:
list- collection to which statistics should be appended
-
-