org.apache.synapse.endpoints
Class EndpointDefinition

java.lang.Object
  extended by 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).


Constructor Summary
EndpointDefinition()
           
 
Method Summary
 void addRetryDisabledErrorCode(int code)
           
 void addSuspendErrorCode(int code)
           
 void addTimeoutErrorCode(int code)
           
 void configure(AspectConfiguration aspectConfiguration)
          Configure aspects according to the given configuration
 void disableStatistics()
           
 void enableStatistics()
           
 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 version
 AspectConfiguration getAspectConfiguration()
          Get the aspects configuration
 String getCharSetEncoding()
          Get the charset encoding for messages sent to the endpoint.
 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> getSuspendErrorCodes()
           
 long getSuspendMaximumDuration()
           
 float getSuspendProgressionFactor()
           
 int getTimeoutAction()
           
 long getTimeoutDuration()
           
 List<Integer> getTimeoutErrorCodes()
           
 int getTraceState()
           
 String getWsRMPolicyKey()
          Get the WS-RM configuration policys' 'key' to be used
 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 isForceGET()
           
 boolean isForcePOX()
           
 boolean isForceREST()
           
 boolean isForceSOAP11()
           
 boolean isForceSOAP12()
           
 boolean isReliableMessagingOn()
          Is RM turned on on this endpoint?
 boolean isReplicationDisabled()
           
 boolean isSecurityOn()
          Is WS-Security turned on on this endpoint?
 boolean isStatisticsEnable()
           
 boolean isUseMTOM()
           
 boolean isUseSeparateListener()
           
 boolean isUseSwa()
           
 void setAddress(String address)
          Set an absolute URL as the address for this named endpoint
 void setAddressingOn(boolean addressingOn)
          Request that WS-A be turned on/off on this endpoint
 void setAddressingVersion(String addressingVersion)
          Set the addressing namespace version
 void setCharSetEncoding(String charSetEncoding)
          Set the charset encoding for messages sent to the endpoint.
 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 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)
          Request that RM be turned on/off on this endpoint
 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 endpoint
 void setSuspendMaximumDuration(long suspendMaximumDuration)
           
 void setSuspendProgressionFactor(float suspendProgressionFactor)
           
 void setTimeoutAction(int timeoutAction)
           
 void setTimeoutDuration(long timeoutDuration)
          Set the timeout duration.
 void setTraceState(int traceState)
           
 void setUseMTOM(boolean useMTOM)
           
 void setUseSeparateListener(boolean b)
           
 void setUseSwa(boolean useSwa)
           
 void setWsRMPolicyKey(String wsRMPolicyKey)
          Set the WS-RM configuration policys' 'key' to be used
 void setWsSecPolicyKey(String wsSecPolicyKey)
          Set the Rampart Security configuration policys' 'key' to be used (See Rampart)
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EndpointDefinition

public EndpointDefinition()
Method Detail

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

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

public boolean isReliableMessagingOn()
Is RM turned on on this endpoint?

Returns:
true if on

setReliableMessagingOn

public void setReliableMessagingOn(boolean reliableMessagingOn)
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

public String getWsRMPolicyKey()
Get the WS-RM configuration policys' 'key' to be used

Returns:
the WS-RM configuration policys' 'key' to be used

setWsRMPolicyKey

public void setWsRMPolicyKey(String wsRMPolicyKey)
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()

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 or null

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

getTraceState

public int getTraceState()

setTraceState

public void setTraceState(int traceState)

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)

getSuspendErrorCodes

public List<Integer> getSuspendErrorCodes()

getTimeoutErrorCodes

public List<Integer> getTimeoutErrorCodes()

getRetryDisabledErrorCodes

public List<Integer> getRetryDisabledErrorCodes()

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)

toString

public String toString()
Overrides:
toString in class Object

setLeafEndpoint

public void setLeafEndpoint(Endpoint leafEndpoint)

isStatisticsEnable

public boolean isStatisticsEnable()

disableStatistics

public void disableStatistics()

enableStatistics

public void enableStatistics()

configure

public void configure(AspectConfiguration aspectConfiguration)
Description copied from interface: AspectConfigurable
Configure aspects according to the given configuration

Specified by:
configure in interface AspectConfigurable
Parameters:
aspectConfiguration - AspectConfiguration instance

getAspectConfiguration

public AspectConfiguration getAspectConfiguration()
Description copied from interface: AspectConfigurable
Get the aspects configuration

Specified by:
getAspectConfiguration in interface AspectConfigurable
Returns:
AspectConfiguration instance


Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.