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 void
createJsonRepresentation()
List<Endpoint>
getChildren()
Get the children of this endpointEndpointContext
getContext()
Get the EndpointContext that has the run-time state of this endpointString
getKey()
EndpointView
getMetricsMBean()
Get a reference to the metrics MBean for this endpointEndpoint
getRealEndpoint()
Endpoint
getRealEndpoint(MessageContext synCtx)
Get the real endpointvoid
init(SynapseEnvironment synapseEnvironment)
This method should implement the initialization of the implemented parts of the configuration.boolean
readyToSend()
Returns true to indicate that the endpoint is ready to service requestsvoid
send(MessageContext synCtx)
Send by calling to the real endpointvoid
setKey(String key)
void
setName(String endpointName)
Set the name of an abstractionString
toString()
-
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:
send
in interfaceEndpoint
- Overrides:
send
in classAbstractEndpoint
- Parameters:
synCtx
- the message to send
-
createJsonRepresentation
protected void createJsonRepresentation()
- Specified by:
createJsonRepresentation
in classAbstractEndpoint
-
getKey
public String getKey()
-
setKey
public void setKey(String key)
-
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 interfaceEndpoint
- Overrides:
readyToSend
in classAbstractEndpoint
- Returns:
- true if endpoint is ready to service requests
-
setName
public void setName(String endpointName)
Description copied from interface:Nameable
Set the name of an abstraction- Specified by:
setName
in interfaceNameable
- Overrides:
setName
in classAbstractEndpoint
- Parameters:
endpointName
- String Representation of name
-
getContext
public EndpointContext getContext()
Description copied from interface:Endpoint
Get the EndpointContext that has the run-time state of this endpoint- Specified by:
getContext
in interfaceEndpoint
- Overrides:
getContext
in classAbstractEndpoint
- Returns:
- the runtime context
-
getChildren
public List<Endpoint> getChildren()
Description copied from interface:Endpoint
Get the children of this endpoint- Specified by:
getChildren
in interfaceEndpoint
- Overrides:
getChildren
in classAbstractEndpoint
- Returns:
- the child endpoints
-
getMetricsMBean
public EndpointView getMetricsMBean()
Description copied from interface:Endpoint
Get a reference to the metrics MBean for this endpoint- Specified by:
getMetricsMBean
in interfaceEndpoint
- Overrides:
getMetricsMBean
in classAbstractEndpoint
- Returns:
- EndpointView instance
-
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 interfaceManagedLifecycle
- Overrides:
init
in classAbstractEndpoint
- Parameters:
synapseEnvironment
- SynapseEnvironment to be used for initialization
-
toString
public String toString()
- Overrides:
toString
in 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()
-
-