tigase.cluster.api

## Interface ClusterControllerIfc

- All Known Implementing Classes:
    ClusterController

      public interface ClusterControllerIfc

  Author:
    Artur Hefczyc Created Mar 16, 2011

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DELIVER_CLUSTER_PACKET_CMD` Field description

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `handleClusterPacket(Element packet)` Method description
    `void` | `nodeConnected(String addr)` Method is called on cluster node connection event.
    `void` | `nodeDisconnected(String addr)` Method is called on cluster node disconnection event.
    `void` | `removeCommandListener(CommandListener listener)` Method description
    `void` | `sendToNodes(String command, Element packet, JID fromNode, Set<JID> visitedNodes, JID... toNodes)` Method which sends command to desired nodes
    `void` | `sendToNodes(String command, JID fromNode, JID... toNodes)` Method which sends command to desired nodes
    `void` | `sendToNodes(String command, Map<String,String> data, Element packet, JID fromNode, Set<JID> visitedNodes, JID... toNodes)` Method which sends command to desired nodes
    `void` | `sendToNodes(String command, Map<String,String> data, JID fromNode, JID... toNodes)` Method which sends command to desired nodes
    `void` | `sendToNodes(String command, Map<String,String> data, JID fromNode, Set<JID> visitedNodes, JID... toNodes)` Method which sends command to desired nodes
    `void` | `sendToNodes(String command, Map<String,String> data, Queue<Element> packets, JID fromNode, Set<JID> visitedNodes, JID... toNodes)` Method which sends command to desired nodes
    `void` | `sendToNodes(String command, Queue<Element> packets, JID fromNode, Set<JID> visitedNodes, JID... toNodes)` Method which sends command to desired nodes
    `void` | `setCommandListener(CommandListener listener)` Method description

- - ### Field Detail

    - #### DELIVER_CLUSTER_PACKET_CMD

          static final String DELIVER_CLUSTER_PACKET_CMD

      Field description
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### handleClusterPacket

          void handleClusterPacket(Element packet)

      Method description
      Parameters:
        `packet` - which should be handled

    - #### nodeConnected

          void nodeConnected(String addr)

      Method is called on cluster node connection event. This is a notification to the component that a new cluster node has connected.
      Parameters:
        `addr` - is a hostname of a cluster node generating the event.

    - #### nodeDisconnected

          void nodeDisconnected(String addr)

      Method is called on cluster node disconnection event. This is a notification to the component that there was network connection lost to one of the cluster nodes.
      Parameters:
        `addr` - is a hostname of a cluster node generating the event.

    - #### removeCommandListener

          void removeCommandListener(CommandListener listener)

      Method description
      Parameters:
        `listener` - CommandListener object

    - #### sendToNodes

          void sendToNodes(String command,
                           Map<String,String> data,
                           Queue<Element> packets,
                           JID fromNode,
                           Set<JID> visitedNodes,
                           JID... toNodes)

      Method which sends command to desired nodes
      Parameters:
        `command` - ID string of the command
        `data` - additional data to be included in the packet
        `packets` - collection of elements to be send to desired nodes
        `fromNode` - address of the source node
        `visitedNodes` - list of all already visited nodes
        `toNodes` - list of nodes to which packet should be sent

    - #### sendToNodes

          void sendToNodes(String command,
                           Queue<Element> packets,
                           JID fromNode,
                           Set<JID> visitedNodes,
                           JID... toNodes)

      Method which sends command to desired nodes
      Parameters:
        `command` - ID string of the command
        `packets` - collection of elements to be send to desired nodes
        `fromNode` - address of the source node
        `visitedNodes` - list of all already visited nodes
        `toNodes` - list of nodes to which packet should be sent

    - #### sendToNodes

          void sendToNodes(String command,
                           Map<String,String> data,
                           JID fromNode,
                           Set<JID> visitedNodes,
                           JID... toNodes)

      Method which sends command to desired nodes
      Parameters:
        `command` - ID string of the command
        `data` - additional data to be included in the packet
        `fromNode` - address of the source node
        `visitedNodes` - list of all already visited nodes
        `toNodes` - list of nodes to which packet should be sent

    - #### sendToNodes

          void sendToNodes(String command,
                           Map<String,String> data,
                           JID fromNode,
                           JID... toNodes)

      Method which sends command to desired nodes
      Parameters:
        `command` - ID string of the command
        `data` - additional data to be included in the packet
        `fromNode` - address of the source node
        `toNodes` - list of nodes to which packet should be sent

    - #### sendToNodes

          void sendToNodes(String command,
                           JID fromNode,
                           JID... toNodes)

      Method which sends command to desired nodes
      Parameters:
        `command` - ID string of the command
        `fromNode` - address of the source node
        `toNodes` - list of nodes to which packet should be sent

    - #### sendToNodes

          void sendToNodes(String command,
                           Element packet,
                           JID fromNode,
                           Set<JID> visitedNodes,
                           JID... toNodes)

      Method which sends command to desired nodes
      Parameters:
        `command` - ID string of the command
        `packet` - collection of elements to be send to desired nodes
        `fromNode` - address of the source node
        `visitedNodes` - list of all already visited nodes
        `toNodes` - list of nodes to which packet should be sent

    - #### sendToNodes

          void sendToNodes(String command,
                           Map<String,String> data,
                           Element packet,
                           JID fromNode,
                           Set<JID> visitedNodes,
                           JID... toNodes)

      Method which sends command to desired nodes
      Parameters:
        `command` - ID string of the command
        `data` - additional data to be included in the packet
        `packet` - element to be send to desired nodes
        `fromNode` - address of the source node
        `visitedNodes` - list of all already visited nodes
        `toNodes` - list of nodes to which packet should be sent

    - #### setCommandListener

          void setCommandListener(CommandListener listener)

      Method description
      Parameters:
        `listener` - CommandListener object

Copyright © 2022 "Tigase, Inc.". All rights reserved.