org.exoplatform.ws.frameworks.cometd.loadbalancer
Class Node

java.lang.Object
  extended by org.exoplatform.ws.frameworks.cometd.loadbalancer.Node

public class Node
extends Object

Created by The eXo Platform SAS.

Version:
$Id: $
Author:
Vitaly Parfonov

Constructor Summary
Node()
          Default constructor.
Node(String id, String url)
           
Node(String id, String url, int maxConenction)
           
 
Method Summary
 void addConnection()
          Add new connection.
 void delConnection()
          Remove connection.
 int getConnected()
           
 String getId()
           
 int getMaxConnection()
           
 String getUrl()
           
 boolean isAlive()
           
 void setAlive(boolean alive)
           
 void setConnected(int connected)
           
 void setId(String id)
           
 void setMaxConnection(int maxConnenction)
           
 void setUrl(String url)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Node

public Node(String id,
            String url,
            int maxConenction)
Parameters:
id - the unique id of node.
url - the base URL of node.
maxConenction - the max count of allowed connection.

Node

public Node(String id,
            String url)
Parameters:
id - the unique id of node.
url - the base URL of node.

Node

public Node()
Default constructor.

Method Detail

getUrl

public String getUrl()
Returns:
the URL of node in cluster.

setUrl

public void setUrl(String url)
Parameters:
url - the URL to set.

getMaxConnection

public int getMaxConnection()
Returns:
the max allowed connection on this node.

setMaxConnection

public void setMaxConnection(int maxConnenction)
Parameters:
maxConnenction - set max allowed connection on this node.

setConnected

public void setConnected(int connected)
Parameters:
connected - set how much already connected.

getConnected

public int getConnected()
Returns:
how much already connected to this node.

isAlive

public boolean isAlive()
Returns:
the alive

setAlive

public void setAlive(boolean alive)
Parameters:
alive - the alive to set

addConnection

public void addConnection()
Add new connection.


delConnection

public void delConnection()
Remove connection.


getId

public String getId()
Returns:
the id

setId

public void setId(String id)
Parameters:
id - the id to set


Copyright © 2009 eXo Platform SAS. All Rights Reserved.