Package org.apache.synapse.endpoints
Class EndpointDefinition
- java.lang.Object
-
- org.apache.synapse.endpoints.EndpointDefinition
-
- All Implemented Interfaces:
AspectConfigurable
public class EndpointDefinition extends Object implements AspectConfigurable
An Endpoint definition contains the information about an endpoint. It is used by leaf level endpoints to store this information (e.g. AddressEndpoint and WSDLEndpoint).
-
-
Field Summary
Fields Modifier and Type Field Description static StringDYNAMIC_URL_VALUEEndpointleafEndpointWho is the leaf level Endpoint which uses me?
-
Constructor Summary
Constructors Constructor Description EndpointDefinition()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddRetryDisabledErrorCode(int code)voidaddRetryEnabledErrorCode(int code)voidaddSuspendErrorCode(int code)voidaddTimeoutErrorCode(int code)voidconfigure(AspectConfiguration aspectConfiguration)Configure aspects according to the given configurationvoiddisableStatistics()voiddisableTracing()voidenableStatistics()voidenableTracing()StringevaluateDynamicEndpointSecurityPolicy(MessageContext synCtx)Evaluates the ws security policy path dynamicallylongevaluateDynamicEndpointTimeout(MessageContext synCtx)StringgetAddress()This should return the absolute EPR address referenced by the named endpoint.StringgetAddress(MessageContext messageContext)This should return the absolute EPR address referenced by the named endpoint.StringgetAddressingVersion()Get the addressing namespace versionAspectConfigurationgetAspectConfiguration()Get the aspects configurationStringgetCharSetEncoding()Get the charset encoding for messages sent to the endpoint.StringgetDynamicAddress(MessageContext messageContext)This should return the absolute EPR address referenced by the named endpoint.SynapsePathgetDynamicPolicy()GET expression to evaluate dynamic ws policySynapsePathgetDynamicTimeoutExpression()longgetEffectiveTimeout()Get the effective timeout duration for the endpoint If endpoint timeout is set explicitly this will return that, If not global timeout interval is returnedSynapseConstants.ENDPOINT_TIMEOUT_TYPEgetEndpointTimeoutType()StringgetFormat()StringgetInboundWsSecPolicyKey()Return the Rampart Security configuration policys' 'key' to be used for inbound messages (See Rampart)longgetInitialSuspendDuration()Get the suspend on fail duration.StringgetOutboundWsSecPolicyKey()Return the Rampart Security configuration policys' 'key' to be used for outbound messages (See Rampart)intgetRetriesOnTimeoutBeforeSuspend()List<Integer>getRetryDisabledErrorCodes()intgetRetryDurationOnTimeout()List<Integer>getRetryEnableErrorCodes()List<Integer>getSuspendErrorCodes()longgetSuspendMaximumDuration()floatgetSuspendProgressionFactor()intgetTimeoutAction()longgetTimeoutDuration()List<Integer>getTimeoutErrorCodes()StringgetWsRMPolicyKey()Deprecated.StringgetWsSecPolicyKey()Return the Rampart Security configuration policys' 'key' to be used (See Rampart)booleanisAddressingOn()Is WS-A turned on on this endpoint?booleanisDynamicPolicy()Checks ws security policy is a dynamic or static onebooleanisDynamicTimeoutEndpoint()booleanisForceGET()booleanisForcePOX()booleanisForceREST()booleanisForceSOAP11()booleanisForceSOAP12()booleanisHTTPEndpoint()booleanisReliableMessagingOn()Deprecated.booleanisReplicationDisabled()booleanisSecurityOn()Is WS-Security turned on on this endpoint?booleanisStatisticsEnable()booleanisTracingEnabled()booleanisUseMTOM()booleanisUseSeparateListener()booleanisUseSwa()voidsetAddress(String address)Set an absolute URL as the address for this named endpointvoidsetAddressingOn(boolean addressingOn)Request that WS-A be turned on/off on this endpointvoidsetAddressingVersion(String addressingVersion)Set the addressing namespace versionvoidsetCharSetEncoding(String charSetEncoding)Set the charset encoding for messages sent to the endpoint.voidsetDynamicPolicy(SynapsePath dynamicPolicy)Set expression to evaluate dynamic ws policyvoidsetDynamicTimeoutExpression(SynapsePath expression)voidsetEndpointTimeoutType(SynapseConstants.ENDPOINT_TIMEOUT_TYPE endpointTimeoutType)voidsetForceGET(boolean forceGET)voidsetForcePOX(boolean forcePOX)voidsetForceREST(boolean forceREST)voidsetForceSOAP11(boolean forceSOAP11)voidsetForceSOAP12(boolean forceSOAP12)voidsetFormat(String format)voidsetHTTPEndpoint(boolean HTTPEndpoint)voidsetInboundWsSecPolicyKey(String inboundWsSecPolicyKey)Set the Rampart Security configuration policys' 'key' to be used for inbound messages (See Rampart)voidsetInitialSuspendDuration(long initialSuspendDuration)Set the suspend on fail duration.voidsetLeafEndpoint(Endpoint leafEndpoint)voidsetOutboundWsSecPolicyKey(String outboundWsSecPolicyKey)Set the Rampart Security configuration policys' 'key' to be used (See Rampart)voidsetReliableMessagingOn(boolean reliableMessagingOn)Deprecated.voidsetReplicationDisabled(boolean replicationDisabled)voidsetRetriesOnTimeoutBeforeSuspend(int retriesOnTimeoutBeforeSuspend)voidsetRetryDurationOnTimeout(int retryDurationOnTimeout)voidsetSecurityOn(boolean securityOn)Request that WS-Sec be turned on/off on this endpointvoidsetSuspendMaximumDuration(long suspendMaximumDuration)voidsetSuspendProgressionFactor(float suspendProgressionFactor)voidsetTimeoutAction(int timeoutAction)voidsetTimeoutDuration(long timeoutDuration)Set the timeout duration.voidsetUseMTOM(boolean useMTOM)voidsetUseSeparateListener(boolean b)voidsetUseSwa(boolean useSwa)voidsetWsRMPolicyKey(String wsRMPolicyKey)Deprecated.voidsetWsSecPolicyKey(String wsSecPolicyKey)Set the Rampart Security configuration policys' 'key' to be used (See Rampart)StringtoString()
-
-
-
Field Detail
-
DYNAMIC_URL_VALUE
public static final String DYNAMIC_URL_VALUE
- See Also:
- Constant Field Values
-
leafEndpoint
public Endpoint leafEndpoint
Who is the leaf level Endpoint which uses me?
-
-
Method Detail
-
setDynamicTimeoutExpression
public void setDynamicTimeoutExpression(SynapsePath expression)
-
getDynamicTimeoutExpression
public SynapsePath getDynamicTimeoutExpression()
-
isDynamicTimeoutEndpoint
public boolean isDynamicTimeoutEndpoint()
-
evaluateDynamicEndpointTimeout
public long evaluateDynamicEndpointTimeout(MessageContext synCtx)
-
getAddress
public String getAddress()
This should return the absolute EPR address referenced by the named endpoint. This may be possibly computed.- Returns:
- an absolute address to be used to reference the named endpoint
-
getAddress
public String getAddress(MessageContext messageContext)
This should return the absolute EPR address referenced by the named endpoint. This may be possibly computed if the ${} properties specified in the URL.- Parameters:
messageContext- the current message context against the address is computed- Returns:
- an absolute address to be used to reference the named endpoint
-
getDynamicAddress
public String getDynamicAddress(MessageContext messageContext)
This should return the absolute EPR address referenced by the named endpoint. This method is implemented to avoid the pattern matching computation in getAddress(MessageContext messageContext) method.- Parameters:
messageContext- the current message context against the address is computed- Returns:
- an absolute address to be used to reference the named endpoint
-
setAddress
public void setAddress(String address)
Set an absolute URL as the address for this named endpoint- Parameters:
address- the absolute address to be used
-
isReliableMessagingOn
@Deprecated public boolean isReliableMessagingOn()
Deprecated.Is RM turned on on this endpoint?- Returns:
- true if on
-
setReliableMessagingOn
@Deprecated public void setReliableMessagingOn(boolean reliableMessagingOn)
Deprecated.Request that RM be turned on/off on this endpoint- Parameters:
reliableMessagingOn- a boolean flag indicating RM is on or not
-
isAddressingOn
public boolean isAddressingOn()
Is WS-A turned on on this endpoint?- Returns:
- true if on
-
setAddressingOn
public void setAddressingOn(boolean addressingOn)
Request that WS-A be turned on/off on this endpoint- Parameters:
addressingOn- a boolean flag indicating addressing is on or not
-
getAddressingVersion
public String getAddressingVersion()
Get the addressing namespace version- Returns:
- the adressing version
-
setAddressingVersion
public void setAddressingVersion(String addressingVersion)
Set the addressing namespace version- Parameters:
addressingVersion- Version of the addressing spec to use
-
isSecurityOn
public boolean isSecurityOn()
Is WS-Security turned on on this endpoint?- Returns:
- true if on
-
setSecurityOn
public void setSecurityOn(boolean securityOn)
Request that WS-Sec be turned on/off on this endpoint- Parameters:
securityOn- a boolean flag indicating security is on or not
-
getWsSecPolicyKey
public String getWsSecPolicyKey()
Return the Rampart Security configuration policys' 'key' to be used (See Rampart)- Returns:
- the Rampart Security configuration policys' 'key' to be used (See Rampart)
-
setWsSecPolicyKey
public void setWsSecPolicyKey(String wsSecPolicyKey)
Set the Rampart Security configuration policys' 'key' to be used (See Rampart)- Parameters:
wsSecPolicyKey- the Rampart Security configuration policys' 'key' to be used
-
getInboundWsSecPolicyKey
public String getInboundWsSecPolicyKey()
Return the Rampart Security configuration policys' 'key' to be used for inbound messages (See Rampart)- Returns:
- the Rampart Security configuration policys' 'key' to be used for inbound messages
-
setInboundWsSecPolicyKey
public void setInboundWsSecPolicyKey(String inboundWsSecPolicyKey)
Set the Rampart Security configuration policys' 'key' to be used for inbound messages (See Rampart)- Parameters:
inboundWsSecPolicyKey- the Rampart Security configuration policys' 'key' to be used
-
getOutboundWsSecPolicyKey
public String getOutboundWsSecPolicyKey()
Return the Rampart Security configuration policys' 'key' to be used for outbound messages (See Rampart)- Returns:
- the ORampart Security configuration policys' 'key' to be used for outbound messages
-
setOutboundWsSecPolicyKey
public void setOutboundWsSecPolicyKey(String outboundWsSecPolicyKey)
Set the Rampart Security configuration policys' 'key' to be used (See Rampart)- Parameters:
outboundWsSecPolicyKey- the Rampart Security configuration policys' 'key' to be used
-
getWsRMPolicyKey
@Deprecated public String getWsRMPolicyKey()
Deprecated.Get the WS-RM configuration policys' 'key' to be used- Returns:
- the WS-RM configuration policys' 'key' to be used
-
setWsRMPolicyKey
@Deprecated public void setWsRMPolicyKey(String wsRMPolicyKey)
Deprecated.Set the WS-RM configuration policys' 'key' to be used- Parameters:
wsRMPolicyKey- the WS-RM configuration policys' 'key' to be used
-
setUseSeparateListener
public void setUseSeparateListener(boolean b)
-
isUseSeparateListener
public boolean isUseSeparateListener()
-
setForcePOX
public void setForcePOX(boolean forcePOX)
-
isForcePOX
public boolean isForcePOX()
-
isForceGET
public boolean isForceGET()
-
setForceGET
public void setForceGET(boolean forceGET)
-
setForceSOAP11
public void setForceSOAP11(boolean forceSOAP11)
-
isForceSOAP11
public boolean isForceSOAP11()
-
setForceSOAP12
public void setForceSOAP12(boolean forceSOAP12)
-
isForceSOAP12
public boolean isForceSOAP12()
-
isForceREST
public boolean isForceREST()
-
setForceREST
public void setForceREST(boolean forceREST)
-
isUseMTOM
public boolean isUseMTOM()
-
setUseMTOM
public void setUseMTOM(boolean useMTOM)
-
isUseSwa
public boolean isUseSwa()
-
setUseSwa
public void setUseSwa(boolean useSwa)
-
getTimeoutDuration
public long getTimeoutDuration()
-
getEffectiveTimeout
public long getEffectiveTimeout()
Get the effective timeout duration for the endpoint If endpoint timeout is set explicitly this will return that, If not global timeout interval is returned- Returns:
- effective timeout duration for the endpoint
-
setTimeoutDuration
public void setTimeoutDuration(long timeoutDuration)
Set the timeout duration.- Parameters:
timeoutDuration- a duration in milliseconds
-
getTimeoutAction
public int getTimeoutAction()
-
setTimeoutAction
public void setTimeoutAction(int timeoutAction)
-
getFormat
public String getFormat()
-
setFormat
public void setFormat(String format)
-
getCharSetEncoding
public String getCharSetEncoding()
Get the charset encoding for messages sent to the endpoint.- Returns:
- charSetEncoding
-
setCharSetEncoding
public void setCharSetEncoding(String charSetEncoding)
Set the charset encoding for messages sent to the endpoint.- Parameters:
charSetEncoding- the charset encoding ornull
-
getInitialSuspendDuration
public long getInitialSuspendDuration()
Get the suspend on fail duration.- Returns:
- suspendOnFailDuration
-
setInitialSuspendDuration
public void setInitialSuspendDuration(long initialSuspendDuration)
Set the suspend on fail duration.- Parameters:
initialSuspendDuration- a duration in milliseconds
-
getSuspendProgressionFactor
public float getSuspendProgressionFactor()
-
setSuspendProgressionFactor
public void setSuspendProgressionFactor(float suspendProgressionFactor)
-
getSuspendMaximumDuration
public long getSuspendMaximumDuration()
-
setSuspendMaximumDuration
public void setSuspendMaximumDuration(long suspendMaximumDuration)
-
getRetriesOnTimeoutBeforeSuspend
public int getRetriesOnTimeoutBeforeSuspend()
-
setRetriesOnTimeoutBeforeSuspend
public void setRetriesOnTimeoutBeforeSuspend(int retriesOnTimeoutBeforeSuspend)
-
getRetryDurationOnTimeout
public int getRetryDurationOnTimeout()
-
setRetryDurationOnTimeout
public void setRetryDurationOnTimeout(int retryDurationOnTimeout)
-
isReplicationDisabled
public boolean isReplicationDisabled()
-
setReplicationDisabled
public void setReplicationDisabled(boolean replicationDisabled)
-
addSuspendErrorCode
public void addSuspendErrorCode(int code)
-
addTimeoutErrorCode
public void addTimeoutErrorCode(int code)
-
addRetryDisabledErrorCode
public void addRetryDisabledErrorCode(int code)
-
addRetryEnabledErrorCode
public void addRetryEnabledErrorCode(int code)
-
isHTTPEndpoint
public boolean isHTTPEndpoint()
-
setHTTPEndpoint
public void setHTTPEndpoint(boolean HTTPEndpoint)
-
setLeafEndpoint
public void setLeafEndpoint(Endpoint leafEndpoint)
-
isStatisticsEnable
public boolean isStatisticsEnable()
-
disableStatistics
public void disableStatistics()
-
enableStatistics
public void enableStatistics()
-
isTracingEnabled
public boolean isTracingEnabled()
-
disableTracing
public void disableTracing()
-
enableTracing
public void enableTracing()
-
configure
public void configure(AspectConfiguration aspectConfiguration)
Description copied from interface:AspectConfigurableConfigure aspects according to the given configuration- Specified by:
configurein interfaceAspectConfigurable- Parameters:
aspectConfiguration- AspectConfiguration instance
-
getAspectConfiguration
public AspectConfiguration getAspectConfiguration()
Description copied from interface:AspectConfigurableGet the aspects configuration- Specified by:
getAspectConfigurationin interfaceAspectConfigurable- Returns:
- AspectConfiguration instance
-
getEndpointTimeoutType
public SynapseConstants.ENDPOINT_TIMEOUT_TYPE getEndpointTimeoutType()
-
setEndpointTimeoutType
public void setEndpointTimeoutType(SynapseConstants.ENDPOINT_TIMEOUT_TYPE endpointTimeoutType)
-
getDynamicPolicy
public SynapsePath getDynamicPolicy()
GET expression to evaluate dynamic ws policy- Returns:
- SynapsePath to the policy
-
setDynamicPolicy
public void setDynamicPolicy(SynapsePath dynamicPolicy)
Set expression to evaluate dynamic ws policy- Parameters:
dynamicPolicy- SynapsePath to the policy
-
isDynamicPolicy
public boolean isDynamicPolicy()
Checks ws security policy is a dynamic or static one- Returns:
- true if policy is dynamic else false.
-
evaluateDynamicEndpointSecurityPolicy
public String evaluateDynamicEndpointSecurityPolicy(MessageContext synCtx)
Evaluates the ws security policy path dynamically- Parameters:
synCtx- MessageContext- Returns:
- string value of policy path
-
-