Package org.apache.synapse.endpoints
Class IndirectEndpoint
- java.lang.Object
-
- org.apache.synapse.FaultHandler
-
- org.apache.synapse.endpoints.AbstractEndpoint
-
- org.apache.synapse.endpoints.IndirectEndpoint
-
- All Implemented Interfaces:
Endpoint,ManagedLifecycle,Nameable,PropertyInclude,SynapseArtifact
public class IndirectEndpoint extends AbstractEndpoint
This class represents a real endpoint referred by a key. An Indirect endpoint does not really have a life, but merely acts as a virtual endpoint for the actual endpoint refferred.
-
-
Field Summary
-
Fields inherited from class org.apache.synapse.endpoints.AbstractEndpoint
anonymous, artifactContainerName, CHILDREN_JSON_ATT, errorHandler, fileName, initialized, isClusteringEnabled, log, NAME_JSON_ATT, trace, TYPE_JSON_ATT
-
-
Constructor Summary
Constructors Constructor Description IndirectEndpoint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcreateJsonRepresentation()List<Endpoint>getChildren()Get the children of this endpointEndpointContextgetContext()Get the EndpointContext that has the run-time state of this endpointStringgetKey()EndpointViewgetMetricsMBean()Get a reference to the metrics MBean for this endpointEndpointgetRealEndpoint()EndpointgetRealEndpoint(MessageContext synCtx)Get the real endpointvoidinit(SynapseEnvironment synapseEnvironment)This method should implement the initialization of the implemented parts of the configuration.booleanreadyToSend()Returns true to indicate that the endpoint is ready to service requestsvoidsend(MessageContext synCtx)Send by calling to the real endpointvoidsetKey(String key)voidsetName(String endpointName)Set the name of an abstractionStringtoString()-
Methods inherited from class org.apache.synapse.endpoints.AbstractEndpoint
addProperties, addProperty, destroy, evaluateProperties, executeEpTypeSpecificFunctions, getArtifactContainerName, getCommentsList, getDefinition, getDescription, getEndpointChildrenAsJson, getErrorHandler, getFileName, getIsEdited, getJsonRepresentation, getName, getParentEndpoint, getProperties, getProperty, getReportingName, getValue, handleException, handleException, handleException, informFailure, isAnonymous, isInitialized, isLeafEndpoint, isRetry, isSuspendFault, isTimeout, isTraceOn, isTraceOrDebugOn, logOnChildEndpointFail, logSetter, onChildEndpointFail, onFault, onSuccess, prepareForEndpointStatistics, removeProperty, setAdvancedProperties, setAnonymous, setArtifactContainerName, setChildren, setCommentsList, setComponentStatisticsId, setContentAware, setDefinition, setDescription, setEnableMBeanStats, setErrorHandler, setErrorOnMessage, setFileName, setForceBuildMC, setIsEdited, setParentEndpoint, setValue, traceOrDebug
-
Methods inherited from class org.apache.synapse.FaultHandler
executeExtendedSynapseHandlerOnFault, getStackTrace, handleFault, handleFault
-
-
-
-
Method Detail
-
send
public void send(MessageContext synCtx)
Send by calling to the real endpoint- Specified by:
sendin interfaceEndpoint- Overrides:
sendin classAbstractEndpoint- Parameters:
synCtx- the message to send
-
createJsonRepresentation
protected void createJsonRepresentation()
- Specified by:
createJsonRepresentationin classAbstractEndpoint
-
getKey
public String getKey()
-
setKey
public void setKey(String key)
-
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
-
setName
public void setName(String endpointName)
Description copied from interface:NameableSet the name of an abstraction- Specified by:
setNamein interfaceNameable- Overrides:
setNamein classAbstractEndpoint- Parameters:
endpointName- String Representation of name
-
getContext
public EndpointContext getContext()
Description copied from interface:EndpointGet the EndpointContext that has the run-time state of this endpoint- Specified by:
getContextin interfaceEndpoint- Overrides:
getContextin classAbstractEndpoint- Returns:
- the runtime context
-
getChildren
public List<Endpoint> getChildren()
Description copied from interface:EndpointGet the children of this endpoint- Specified by:
getChildrenin interfaceEndpoint- Overrides:
getChildrenin classAbstractEndpoint- Returns:
- the child endpoints
-
getMetricsMBean
public EndpointView getMetricsMBean()
Description copied from interface:EndpointGet a reference to the metrics MBean for this endpoint- Specified by:
getMetricsMBeanin interfaceEndpoint- Overrides:
getMetricsMBeanin classAbstractEndpoint- Returns:
- EndpointView instance
-
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
-
toString
public String toString()
- Overrides:
toStringin classAbstractEndpoint
-
getRealEndpoint
public Endpoint getRealEndpoint(MessageContext synCtx)
Get the real endpoint- Parameters:
synCtx- Message Context- Returns:
- real endpoint which is referred by the indirect endpoint
-
getRealEndpoint
public Endpoint getRealEndpoint()
-
-