Package tigase.cluster.strategy.cmd

## Class PacketForwardCmd

- java.lang.Object
- - tigase.cluster.api.CommandListenerAbstract
  - - tigase.cluster.strategy.cmd.PacketForwardCmd

- All Implemented Interfaces:
    `java.lang.Comparable<CommandListener>`, `CommandListener`

      public class PacketForwardCmd
      extends CommandListenerAbstract

  Version:
    5.2.0, 13/06/22
  Author:
    Artur Hefczyc

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static java.lang.String` | `PACKET_FROM_KEY` |
    `static java.lang.String` | `STABLE_ID_KEY` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `PacketForwardCmd​(java.lang.String name, DefaultClusteringStrategyAbstract strategy)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `executeCommand​(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 processing

    - ### Methods inherited from class tigase.cluster.api.CommandListenerAbstract

      `compareTo, equals, getName, getPriority, getStatistics, getSyncInTraffic, getSyncOutTraffic, hashCode, incSyncInTraffic, incSyncOutTraffic, setName, setPriority`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### PACKET_FROM_KEY

          public static final java.lang.String PACKET_FROM_KEY

      See Also:
        Constant Field Values

    - #### STABLE_ID_KEY

          public static final java.lang.String STABLE_ID_KEY

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### PacketForwardCmd

          public PacketForwardCmd​(java.lang.String name,
                                  DefaultClusteringStrategyAbstract strategy)

  - ### Method Detail

    - #### executeCommand

          public 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

      Description copied from interface: `CommandListener`
      Method is responsible for executing commands from other nodes and appropriate processing
      Parameters:
        `fromNode` - address of the node from which command was received
        `visitedNodes` - collection of already visited nodes
        `data` - additional data associated with the command in addition to the main `Element`
        `packets` - collection of `Element` commands to be executed
      Throws:
        `ClusterCommandException` - execution exception