org.apache.synapse.endpoints
Class DynamicLoadbalanceEndpoint
java.lang.Object
org.apache.synapse.FaultHandler
org.apache.synapse.endpoints.AbstractEndpoint
org.apache.synapse.endpoints.LoadbalanceEndpoint
org.apache.synapse.endpoints.DynamicLoadbalanceEndpoint
- All Implemented Interfaces:
- Endpoint, ManagedLifecycle, Nameable, PropertyInclude, SynapseArtifact
public class DynamicLoadbalanceEndpoint
- extends LoadbalanceEndpoint
Represents a dynamic load balance endpoint. The application membership is not static,
but discovered through some mechanism such as using a GCF
Methods inherited from class org.apache.synapse.endpoints.LoadbalanceEndpoint |
destroy, getAlgorithm, getMembers, getNextChild, isFailover, onChildEndpointFail, readyToSend, setAlgorithm, setFailover, setMembers, startApplicationMembershipTimer |
Methods inherited from class org.apache.synapse.endpoints.AbstractEndpoint |
addProperties, addProperty, evaluateProperties, getChildren, getContext, getDefinition, getDescription, getErrorHandler, getFileName, getMetricsMBean, getName, getParentEndpoint, getProperties, getProperty, handleException, handleException, informFailure, isAnonymous, isInitialized, isLeafEndpoint, isRetryDisabled, isSuspendFault, isTimeout, isTraceOn, isTraceOrDebugOn, logOnChildEndpointFail, onFault, onSuccess, prepareForEndpointStatistics, removeProperty, setAnonymous, setChildren, setDefinition, setDescription, setEnableMBeanStats, setErrorHandler, setErrorOnMessage, setFileName, setParentEndpoint, toString, traceOrDebug |
sessionAffinity
protected boolean sessionAffinity
- Flag to enable session affinity based load balancing.
dispatcher
protected Dispatcher dispatcher
- Dispatcher used for session affinity.
sessionTimeout
protected long sessionTimeout
DynamicLoadbalanceEndpoint
public DynamicLoadbalanceEndpoint()
init
public void init(SynapseEnvironment synapseEnvironment)
- Description copied from interface:
ManagedLifecycle
- This method should implement the initialization of the
implemented parts of the configuration.
- Specified by:
init
in interface ManagedLifecycle
- Overrides:
init
in class LoadbalanceEndpoint
- Parameters:
synapseEnvironment
- SynapseEnvironment to be used for initialization
setLoadBalanceMembershipHandler
public void setLoadBalanceMembershipHandler(LoadBalanceMembershipHandler lbMembershipHandler)
getLbMembershipHandler
public LoadBalanceMembershipHandler getLbMembershipHandler()
send
public void send(MessageContext synCtx)
- Description copied from interface:
Endpoint
- Sends the message context according to an endpoint specific behavior.
- Specified by:
send
in interface Endpoint
- Overrides:
send
in class LoadbalanceEndpoint
- Parameters:
synCtx
- MessageContext to be sent.
setCookieHeader
protected void setCookieHeader(MessageContext synCtx)
extractSessionID
protected String extractSessionID(MessageContext synCtx,
String key)
setName
public void setName(String name)
- Description copied from interface:
Nameable
- Set the name of an abstraction
- Specified by:
setName
in interface Nameable
- Overrides:
setName
in class AbstractEndpoint
- Parameters:
name
- String Representation of name
getDispatcher
public Dispatcher getDispatcher()
setDispatcher
public void setDispatcher(Dispatcher dispatcher)
getSessionTimeout
public long getSessionTimeout()
setSessionTimeout
public void setSessionTimeout(long sessionTimeout)
setSessionAffinity
public void setSessionAffinity(boolean sessionAffinity)
isSessionAffinityBasedLB
public boolean isSessionAffinityBasedLB()
sendToApplicationMember
protected void sendToApplicationMember(MessageContext synCtx,
Member currentMember,
DynamicLoadbalanceFaultHandler faultHandler,
boolean newSession)
Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.