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 String
DYNAMIC_URL_VALUE
Endpoint
leafEndpoint
Who 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 void
addRetryDisabledErrorCode(int code)
void
addRetryEnabledErrorCode(int code)
void
addSuspendErrorCode(int code)
void
addTimeoutErrorCode(int code)
void
configure(AspectConfiguration aspectConfiguration)
Configure aspects according to the given configurationvoid
disableStatistics()
void
disableTracing()
void
enableStatistics()
void
enableTracing()
String
evaluateDynamicEndpointSecurityPolicy(MessageContext synCtx)
Evaluates the ws security policy path dynamicallylong
evaluateDynamicEndpointTimeout(MessageContext synCtx)
String
getAddress()
This should return the absolute EPR address referenced by the named endpoint.String
getAddress(MessageContext messageContext)
This should return the absolute EPR address referenced by the named endpoint.String
getAddressingVersion()
Get the addressing namespace versionAspectConfiguration
getAspectConfiguration()
Get the aspects configurationString
getCharSetEncoding()
Get the charset encoding for messages sent to the endpoint.String
getDynamicAddress(MessageContext messageContext)
This should return the absolute EPR address referenced by the named endpoint.SynapsePath
getDynamicPolicy()
GET expression to evaluate dynamic ws policySynapsePath
getDynamicTimeoutExpression()
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 returnedSynapseConstants.ENDPOINT_TIMEOUT_TYPE
getEndpointTimeoutType()
String
getFormat()
String
getInboundWsSecPolicyKey()
Return the Rampart Security configuration policys' 'key' to be used for inbound messages (See Rampart)long
getInitialSuspendDuration()
Get the suspend on fail duration.String
getOutboundWsSecPolicyKey()
Return the Rampart Security configuration policys' 'key' to be used for outbound messages (See Rampart)int
getRetriesOnTimeoutBeforeSuspend()
List<Integer>
getRetryDisabledErrorCodes()
int
getRetryDurationOnTimeout()
List<Integer>
getRetryEnableErrorCodes()
List<Integer>
getSuspendErrorCodes()
long
getSuspendMaximumDuration()
float
getSuspendProgressionFactor()
int
getTimeoutAction()
long
getTimeoutDuration()
List<Integer>
getTimeoutErrorCodes()
String
getWsRMPolicyKey()
Deprecated.String
getWsSecPolicyKey()
Return the Rampart Security configuration policys' 'key' to be used (See Rampart)boolean
isAddressingOn()
Is WS-A turned on on this endpoint?boolean
isDynamicPolicy()
Checks ws security policy is a dynamic or static oneboolean
isDynamicTimeoutEndpoint()
boolean
isForceGET()
boolean
isForcePOX()
boolean
isForceREST()
boolean
isForceSOAP11()
boolean
isForceSOAP12()
boolean
isHTTPEndpoint()
boolean
isReliableMessagingOn()
Deprecated.boolean
isReplicationDisabled()
boolean
isSecurityOn()
Is WS-Security turned on on this endpoint?boolean
isStatisticsEnable()
boolean
isTracingEnabled()
boolean
isUseMTOM()
boolean
isUseSeparateListener()
boolean
isUseSwa()
void
setAddress(String address)
Set an absolute URL as the address for this named endpointvoid
setAddressingOn(boolean addressingOn)
Request that WS-A be turned on/off on this endpointvoid
setAddressingVersion(String addressingVersion)
Set the addressing namespace versionvoid
setCharSetEncoding(String charSetEncoding)
Set the charset encoding for messages sent to the endpoint.void
setDynamicPolicy(SynapsePath dynamicPolicy)
Set expression to evaluate dynamic ws policyvoid
setDynamicTimeoutExpression(SynapsePath expression)
void
setEndpointTimeoutType(SynapseConstants.ENDPOINT_TIMEOUT_TYPE endpointTimeoutType)
void
setForceGET(boolean forceGET)
void
setForcePOX(boolean forcePOX)
void
setForceREST(boolean forceREST)
void
setForceSOAP11(boolean forceSOAP11)
void
setForceSOAP12(boolean forceSOAP12)
void
setFormat(String format)
void
setHTTPEndpoint(boolean HTTPEndpoint)
void
setInboundWsSecPolicyKey(String inboundWsSecPolicyKey)
Set the Rampart Security configuration policys' 'key' to be used for inbound messages (See Rampart)void
setInitialSuspendDuration(long initialSuspendDuration)
Set the suspend on fail duration.void
setLeafEndpoint(Endpoint leafEndpoint)
void
setOutboundWsSecPolicyKey(String outboundWsSecPolicyKey)
Set the Rampart Security configuration policys' 'key' to be used (See Rampart)void
setReliableMessagingOn(boolean reliableMessagingOn)
Deprecated.void
setReplicationDisabled(boolean replicationDisabled)
void
setRetriesOnTimeoutBeforeSuspend(int retriesOnTimeoutBeforeSuspend)
void
setRetryDurationOnTimeout(int retryDurationOnTimeout)
void
setSecurityOn(boolean securityOn)
Request that WS-Sec be turned on/off on this endpointvoid
setSuspendMaximumDuration(long suspendMaximumDuration)
void
setSuspendProgressionFactor(float suspendProgressionFactor)
void
setTimeoutAction(int timeoutAction)
void
setTimeoutDuration(long timeoutDuration)
Set the timeout duration.void
setUseMTOM(boolean useMTOM)
void
setUseSeparateListener(boolean b)
void
setUseSwa(boolean useSwa)
void
setWsRMPolicyKey(String wsRMPolicyKey)
Deprecated.void
setWsSecPolicyKey(String wsSecPolicyKey)
Set the Rampart Security configuration policys' 'key' to be used (See Rampart)String
toString()
-
-
-
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:AspectConfigurable
Configure aspects according to the given configuration- Specified by:
configure
in interfaceAspectConfigurable
- Parameters:
aspectConfiguration
- AspectConfiguration instance
-
getAspectConfiguration
public AspectConfiguration getAspectConfiguration()
Description copied from interface:AspectConfigurable
Get the aspects configuration- Specified by:
getAspectConfiguration
in 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
-
-