Class LoadBalancerImpl

  • All Implemented Interfaces:
    LoadBalancer, org.picocontainer.Startable

    public class LoadBalancerImpl
    extends Object
    implements LoadBalancer, org.picocontainer.Startable
    Created by The eXo Platform SAS.
    Version:
    $Id: $
    Author:
    Vitaly Parfonov
    • Constructor Detail

      • LoadBalancerImpl

        public LoadBalancerImpl​(org.exoplatform.container.xml.InitParams params)
        Parameters:
        params - the initial parameters.
    • Method Detail

      • addNode

        public void addNode​(Node node)
        Add new node for cometd connection.
        Specified by:
        addNode in interface LoadBalancer
        Parameters:
        node - the new node in cluster.
      • connection

        public String connection​(String exoId)
        Specified by:
        connection in interface LoadBalancer
        Parameters:
        exoId - the id of client.
        Returns:
        URL of cometd node.
      • release

        public boolean release​(String exoId)
        Release connection on the node there client connected.
        Specified by:
        release in interface LoadBalancer
        Parameters:
        exoId - client id.
        Returns:
        true if release successful
      • removeNode

        public void removeNode​(String id)
        Remove cometd node.
        Specified by:
        removeNode in interface LoadBalancer
        Parameters:
        id - the ID of cometd node.
      • start

        public void start()
        Specified by:
        start in interface org.picocontainer.Startable
      • stop

        public void stop()
        Specified by:
        stop in interface org.picocontainer.Startable
      • addPlugin

        public void addPlugin​(org.exoplatform.container.component.ComponentPlugin plugin)