|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.synapse.FaultHandler
org.apache.synapse.endpoints.AbstractEndpoint
org.apache.synapse.endpoints.LoadbalanceEndpoint
public class LoadbalanceEndpoint
A Load balance endpoint contains multiple child endpoints. It routes 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 sent to the next endpoint obtained using the load balancing algorithm. If all the endpoints have failed and a parent endpoint is available, onChildEndpointFail(...) method of parent endpoint is called. If a parent is not available, this will call next FaultHandler for the message context.
| Field Summary |
|---|
| Fields inherited from class org.apache.synapse.endpoints.AbstractEndpoint |
|---|
anonymous, errorHandler, fileName, initialized, isClusteringEnabled, log, trace |
| Constructor Summary | |
|---|---|
LoadbalanceEndpoint()
|
|
| Method Summary | |
|---|---|
void |
destroy()
This method should implement the destroying of the implemented parts of the configuration. |
LoadbalanceAlgorithm |
getAlgorithm()
|
List<Member> |
getMembers()
|
protected Endpoint |
getNextChild(MessageContext synCtx)
|
void |
init(SynapseEnvironment synapseEnvironment)
This method should implement the initialization of the implemented parts of the configuration. |
boolean |
isFailover()
|
void |
onChildEndpointFail(Endpoint endpoint,
MessageContext synMessageContext)
Endpoints that contain other endpoints should implement this method. |
boolean |
readyToSend()
If this endpoint is in inactive state, checks if all immediate child endpoints are still failed. |
void |
send(MessageContext synCtx)
Sends the message context according to an endpoint specific behavior. |
void |
setAlgorithm(LoadbalanceAlgorithm algorithm)
|
void |
setFailover(boolean failover)
|
void |
setMembers(List<Member> members)
|
void |
startApplicationMembershipTimer()
|
| Methods inherited from class org.apache.synapse.FaultHandler |
|---|
getStackTrace, handleFault, handleFault |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LoadbalanceEndpoint()
| Method Detail |
|---|
public void init(SynapseEnvironment synapseEnvironment)
ManagedLifecycle
init in interface ManagedLifecycleinit in class AbstractEndpointsynapseEnvironment - SynapseEnvironment to be used for initializationpublic void destroy()
ManagedLifecycle
destroy in interface ManagedLifecycledestroy in class AbstractEndpointpublic void send(MessageContext synCtx)
Endpoint
send in interface Endpointsend in class AbstractEndpointsynCtx - MessageContext to be sent.public boolean readyToSend()
readyToSend in interface EndpointreadyToSend in class AbstractEndpoint
public void onChildEndpointFail(Endpoint endpoint,
MessageContext synMessageContext)
Endpoint
onChildEndpointFail in interface EndpointonChildEndpointFail in class AbstractEndpointendpoint - The child endpoint which caused the exception.synMessageContext - MessageContext that was used in the failed attempt.public boolean isFailover()
public void setFailover(boolean failover)
public LoadbalanceAlgorithm getAlgorithm()
public void setAlgorithm(LoadbalanceAlgorithm algorithm)
protected Endpoint getNextChild(MessageContext synCtx)
public void setMembers(List<Member> members)
public List<Member> getMembers()
public void startApplicationMembershipTimer()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||