Interface ClusterControllerIfc

  • All Known Implementing Classes:
    ClusterController

    public interface ClusterControllerIfc
    Author:
    Artur Hefczyc Created Mar 16, 2011
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void handleClusterPacket​(Element packet)
      Method handles cluster packet received from cluster connection.
      void nodeConnected​(java.lang.String addr)
      Method is called on cluster node connection event.
      void nodeDisconnected​(java.lang.String addr)
      Method is called on cluster node disconnection event.
      void removeCommandListener​(CommandListener listener)  
      void sendToNodes​(java.lang.String command, java.util.Map<java.lang.String,​java.lang.String> data, java.util.Queue<Element> packets, JID fromNode, java.util.Set<JID> visitedNodes, JID... toNodes)
      Method which sends command to desired nodes
      void sendToNodes​(java.lang.String command, java.util.Map<java.lang.String,​java.lang.String> data, Element packet, JID fromNode, java.util.Set<JID> visitedNodes, JID... toNodes)
      Method which sends command to desired nodes
      void sendToNodes​(java.lang.String command, java.util.Map<java.lang.String,​java.lang.String> data, JID fromNode, java.util.Set<JID> visitedNodes, JID... toNodes)
      Method which sends command to desired nodes
      void sendToNodes​(java.lang.String command, java.util.Map<java.lang.String,​java.lang.String> data, JID fromNode, JID... toNodes)
      Method which sends command to desired nodes
      void sendToNodes​(java.lang.String command, java.util.Queue<Element> packets, JID fromNode, java.util.Set<JID> visitedNodes, JID... toNodes)
      Method which sends command to desired nodes
      void sendToNodes​(java.lang.String command, Element packet, JID fromNode, java.util.Set<JID> visitedNodes, JID... toNodes)
      Method which sends command to desired nodes
      void sendToNodes​(java.lang.String command, JID fromNode, JID... toNodes)
      Method which sends command to desired nodes
      void setCommandListener​(CommandListener listener)  
    • Field Detail

      • DELIVER_CLUSTER_PACKET_CMD

        static final java.lang.String DELIVER_CLUSTER_PACKET_CMD
        See Also:
        Constant Field Values
    • Method Detail

      • handleClusterPacket

        void handleClusterPacket​(Element packet)
        Method handles cluster packet received from cluster connection.
        Parameters:
        packet - which should be handled
      • nodeConnected

        void nodeConnected​(java.lang.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​(java.lang.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)
      • sendToNodes

        void sendToNodes​(java.lang.String command,
                         java.util.Map<java.lang.String,​java.lang.String> data,
                         java.util.Queue<Element> packets,
                         JID fromNode,
                         java.util.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​(java.lang.String command,
                         java.util.Queue<Element> packets,
                         JID fromNode,
                         java.util.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​(java.lang.String command,
                         java.util.Map<java.lang.String,​java.lang.String> data,
                         JID fromNode,
                         java.util.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​(java.lang.String command,
                         java.util.Map<java.lang.String,​java.lang.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​(java.lang.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​(java.lang.String command,
                         Element packet,
                         JID fromNode,
                         java.util.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​(java.lang.String command,
                         java.util.Map<java.lang.String,​java.lang.String> data,
                         Element packet,
                         JID fromNode,
                         java.util.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)