Home » synapse-1.2-src » org.apache.synapse.endpoints » [javadoc | source]
org.apache.synapse.endpoints
public class: LoadbalanceEndpoint [javadoc | source]
java.lang.Object
   org.apache.synapse.endpoints.LoadbalanceEndpoint

All Implemented Interfaces:
    Endpoint

Load balance endpoint can have multiple endpoints. It will route messages according to the specified load balancing algorithm. This will assume that all immediate child endpoints are identical in state (state is replicated) or state is not maintained at those endpoints. If an endpoint is failing, the failed endpoint is marked as inactive and the message to the next endpoint obtained using the load balancing algorithm. If all the endpoints have failed and the parent endpoint is available, onChildEndpointFail(...) method of parent endpoint is called. If parent is not available, this will call next FaultHandler for the message context.
Method from org.apache.synapse.endpoints.LoadbalanceEndpoint Summary:
getAlgorithm,   getEndpoints,   getName,   isActive,   isFailover,   onChildEndpointFail,   send,   setActive,   setAlgorithm,   setEndpoints,   setFailover,   setName,   setParentEndpoint
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.synapse.endpoints.LoadbalanceEndpoint Detail:
 public LoadbalanceAlgorithm getAlgorithm() 
 public List<Endpoint> getEndpoints() 
 public String getName() 
 public boolean isActive(MessageContext synMessageContext) 
    If this endpoint is in inactive state, checks if all immediate child endpoints are still failed. If so returns false. If at least one child endpoint is in active state, sets this endpoint's state to active and returns true. As this a sessionless load balancing endpoint having one active child endpoint is enough to consider this as active.
 public boolean isFailover() 
 public  void onChildEndpointFail(Endpoint endpoint,
    MessageContext synMessageContext) 
 public  void send(MessageContext synMessageContext) 
 public  void setActive(boolean active,
    MessageContext synMessageContext) 
 public  void setAlgorithm(LoadbalanceAlgorithm algorithm) 
 public  void setEndpoints(List<Endpoint> endpoints) 
 public  void setFailover(boolean failover) 
 public  void setName(String name) 
 public  void setParentEndpoint(Endpoint parentEndpoint)