Class LoadBalancerImpl
java.lang.Object
org.exoplatform.ws.frameworks.cometd.loadbalancer.LoadBalancerImpl
- All Implemented Interfaces:
LoadBalancer,org.picocontainer.Startable
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd new node for cometd connection.voidaddPlugin(org.exoplatform.container.component.ComponentPlugin plugin) connection(String exoId) booleanRelease connection on the node there client connected.voidremoveNode(String id) Remove cometd node.voidstart()voidstop()
-
Constructor Details
-
LoadBalancerImpl
public LoadBalancerImpl(org.exoplatform.container.xml.InitParams params) - Parameters:
params- the initial parameters.
-
-
Method Details
-
addNode
Add new node for cometd connection.- Specified by:
addNodein interfaceLoadBalancer- Parameters:
node- the new node in cluster.
-
connection
- Specified by:
connectionin interfaceLoadBalancer- Parameters:
exoId- the id of client.- Returns:
- URL of cometd node.
-
getAliveNodesURL
- Specified by:
getAliveNodesURLin interfaceLoadBalancer- Returns:
- URLs of all cometd nodes.
-
release
Release connection on the node there client connected.- Specified by:
releasein interfaceLoadBalancer- Parameters:
exoId- client id.- Returns:
- true if release successful
-
removeNode
Remove cometd node.- Specified by:
removeNodein interfaceLoadBalancer- Parameters:
id- the ID of cometd node.
-
start
public void start()- Specified by:
startin interfaceorg.picocontainer.Startable
-
stop
public void stop()- Specified by:
stopin interfaceorg.picocontainer.Startable
-
addPlugin
public void addPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
-