Package org.apache.synapse.endpoints
Class RecipientListEndpoint
- java.lang.Object
-
- org.apache.synapse.FaultHandler
-
- org.apache.synapse.endpoints.AbstractEndpoint
-
- org.apache.synapse.endpoints.RecipientListEndpoint
-
- All Implemented Interfaces:
Endpoint,ManagedLifecycle,Nameable,PropertyInclude,SynapseArtifact
public class RecipientListEndpoint extends AbstractEndpoint
- Author:
- nuwan
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
Fields Modifier and Type Field Description static intDEFAULT_MAX_POOL-
Fields inherited from class org.apache.synapse.endpoints.AbstractEndpoint
anonymous, artifactContainerName, CHILDREN_JSON_ATT, errorHandler, fileName, initialized, isClusteringEnabled, NAME_JSON_ATT, trace, TYPE_JSON_ATT
-
-
Constructor Summary
Constructors Constructor Description RecipientListEndpoint()RecipientListEndpoint(int poolsize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcreateJsonRepresentation()voiddestroy()This method should implement the destroying of the implemented parts of the configuration.intgetCurrentPoolSize()ValuegetDynamicEnpointSet()List<org.apache.axis2.clustering.Member>getMembers()voidinit(SynapseEnvironment synapseEnvironment)This method should implement the initialization of the implemented parts of the configuration.booleanisFailover()voidonChildEndpointFail(Endpoint endpoint, MessageContext synMessageContext)Endpoints that contain other endpoints should implement this method.booleanreadyToSend()Returns true to indicate that the endpoint is ready to service requestsvoidsend(MessageContext synCtx)Sends the message context according to an endpoint specific behavior.voidsendMessage(MessageContext synCtx)voidsetDynamicEnpointSet(Value dynamicEnpointSet)voidsetFailover(boolean failover)voidsetMembers(List<org.apache.axis2.clustering.Member> members)-
Methods inherited from class org.apache.synapse.endpoints.AbstractEndpoint
addProperties, addProperty, evaluateProperties, executeEpTypeSpecificFunctions, getArtifactContainerName, getChildren, getCommentsList, getContext, getDefinition, getDescription, getEndpointChildrenAsJson, getErrorHandler, getFileName, getIsEdited, getJsonRepresentation, getMetricsMBean, getName, getParentEndpoint, getProperties, getProperty, getReportingName, getValue, handleException, handleException, handleException, informFailure, isAnonymous, isInitialized, isLeafEndpoint, isRetry, isSuspendFault, isTimeout, isTraceOn, isTraceOrDebugOn, logOnChildEndpointFail, logSetter, onFault, onSuccess, prepareForEndpointStatistics, removeProperty, setAdvancedProperties, setAnonymous, setArtifactContainerName, setChildren, setCommentsList, setComponentStatisticsId, setContentAware, setDefinition, setDescription, setEnableMBeanStats, setErrorHandler, setErrorOnMessage, setFileName, setForceBuildMC, setIsEdited, setName, setParentEndpoint, setValue, toString, traceOrDebug
-
Methods inherited from class org.apache.synapse.FaultHandler
executeExtendedSynapseHandlerOnFault, getStackTrace, handleFault, handleFault
-
-
-
-
Field Detail
-
DEFAULT_MAX_POOL
public static final int DEFAULT_MAX_POOL
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(SynapseEnvironment synapseEnvironment)
Description copied from interface:ManagedLifecycleThis method should implement the initialization of the implemented parts of the configuration.- Specified by:
initin interfaceManagedLifecycle- Overrides:
initin classAbstractEndpoint- Parameters:
synapseEnvironment- SynapseEnvironment to be used for initialization
-
destroy
public void destroy()
Description copied from interface:ManagedLifecycleThis method should implement the destroying of the implemented parts of the configuration.- Specified by:
destroyin interfaceManagedLifecycle- Overrides:
destroyin classAbstractEndpoint
-
createJsonRepresentation
protected void createJsonRepresentation()
- Specified by:
createJsonRepresentationin classAbstractEndpoint
-
send
public void send(MessageContext synCtx)
Description copied from interface:EndpointSends the message context according to an endpoint specific behavior.- Specified by:
sendin interfaceEndpoint- Overrides:
sendin classAbstractEndpoint- Parameters:
synCtx- MessageContext to be sent.
-
sendMessage
public void sendMessage(MessageContext synCtx)
-
readyToSend
public boolean readyToSend()
Description copied from interface:EndpointReturns true to indicate that the endpoint is ready to service requests- Specified by:
readyToSendin interfaceEndpoint- Overrides:
readyToSendin classAbstractEndpoint- Returns:
- true if endpoint is ready to service requests
-
onChildEndpointFail
public void onChildEndpointFail(Endpoint endpoint, MessageContext synMessageContext)
Description copied from interface:EndpointEndpoints 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:
onChildEndpointFailin interfaceEndpoint- Overrides:
onChildEndpointFailin classAbstractEndpoint- Parameters:
endpoint- The child endpoint which caused the exception.synMessageContext- MessageContext that was used in the failed attempt.
-
getMembers
public List<org.apache.axis2.clustering.Member> getMembers()
-
setMembers
public void setMembers(List<org.apache.axis2.clustering.Member> members)
-
isFailover
public boolean isFailover()
-
setFailover
public void setFailover(boolean failover)
-
getDynamicEnpointSet
public Value getDynamicEnpointSet()
-
setDynamicEnpointSet
public void setDynamicEnpointSet(Value dynamicEnpointSet)
-
getCurrentPoolSize
public int getCurrentPoolSize()
-
-