org.apache.synapse.endpoints
Class RecipientListEndpoint

java.lang.Object
  extended by org.apache.synapse.FaultHandler
      extended by org.apache.synapse.endpoints.AbstractEndpoint
          extended by org.apache.synapse.endpoints.RecipientListEndpoint
All Implemented Interfaces:
Endpoint, ManagedLifecycle, Nameable, PropertyInclude, SynapseArtifact

public class RecipientListEndpoint
extends AbstractEndpoint

A Recipient List endpoint can contain multiple child endpoints or member elements. It routes cloned copies of messages to each child recipient. This will assume that all immediate child endpoints are identical in state (state is replicated) or state is not maintained at those endpoints.


Field Summary
static int DEFAULT_MAX_POOL
           
 
Fields inherited from class org.apache.synapse.endpoints.AbstractEndpoint
anonymous, errorHandler, fileName, initialized, isClusteringEnabled, trace
 
Constructor Summary
RecipientListEndpoint()
           
RecipientListEndpoint(int poolSize)
           
 
Method Summary
 void destroy()
          This method should implement the destroying of the implemented parts of the configuration.
 int getCurrentPoolSize()
           
 Value getDynamicEndpointSet()
           
 List<Member> getMembers()
           
 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()
          Returns true to indicate that the endpoint is ready to service requests
 void send(MessageContext synCtx)
          Sends the message context according to an endpoint specific behavior.
 void setDynamicEndpointSet(Value dynamicEndpointSet)
           
 void setFailover(boolean failover)
           
 void setMembers(List<Member> members)
           
 
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, setName, setParentEndpoint, toString, traceOrDebug
 
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
 

Field Detail

DEFAULT_MAX_POOL

public static final int DEFAULT_MAX_POOL
See Also:
Constant Field Values
Constructor Detail

RecipientListEndpoint

public RecipientListEndpoint(int poolSize)

RecipientListEndpoint

public RecipientListEndpoint()
Method Detail

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 AbstractEndpoint
Parameters:
synapseEnvironment - SynapseEnvironment to be used for initialization

destroy

public void destroy()
Description copied from interface: ManagedLifecycle
This method should implement the destroying of the implemented parts of the configuration.

Specified by:
destroy in interface ManagedLifecycle
Overrides:
destroy in class AbstractEndpoint

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 AbstractEndpoint
Parameters:
synCtx - MessageContext to be sent.

readyToSend

public boolean readyToSend()
Description copied from interface: Endpoint
Returns true to indicate that the endpoint is ready to service requests

Specified by:
readyToSend in interface Endpoint
Overrides:
readyToSend in class AbstractEndpoint
Returns:
true if endpoint is ready to service requests

onChildEndpointFail

public void onChildEndpointFail(Endpoint endpoint,
                                MessageContext synMessageContext)
Description copied from interface: Endpoint
Endpoints that contain other endpoints should implement this method. It will be called if a child endpoint causes an exception. Action to be taken on such failure is up to the implementation. But it is good practice to first try addressing the issue. If it can't be addressed propagate the exception to parent endpoint by calling parent endpoint's onChildEndpointFail(...) method.

Specified by:
onChildEndpointFail in interface Endpoint
Overrides:
onChildEndpointFail in class AbstractEndpoint
Parameters:
endpoint - The child endpoint which caused the exception.
synMessageContext - MessageContext that was used in the failed attempt.

getMembers

public List<Member> getMembers()

setMembers

public void setMembers(List<Member> members)

getDynamicEndpointSet

public Value getDynamicEndpointSet()

setDynamicEndpointSet

public void setDynamicEndpointSet(Value dynamicEndpointSet)

getCurrentPoolSize

public int getCurrentPoolSize()

isFailover

public boolean isFailover()

setFailover

public void setFailover(boolean failover)


Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.