org.apache.synapse.mediators.throttle
Class ThrottleMediator
java.lang.Object
org.apache.synapse.mediators.AbstractMediator
org.apache.synapse.mediators.throttle.ThrottleMediator
- All Implemented Interfaces:
- org.apache.synapse.aspects.AspectConfigurable, org.apache.synapse.ManagedLifecycle, org.apache.synapse.Mediator, org.apache.synapse.mediators.FlowContinuableMediator, org.apache.synapse.SynapseArtifact
public class ThrottleMediator
- extends org.apache.synapse.mediators.AbstractMediator
- implements org.apache.synapse.ManagedLifecycle, org.apache.synapse.mediators.FlowContinuableMediator
The Mediator for the throttling - Throttling will occur according to the ws-policy
which is specified as the key for lookup from the registry or the inline policy
Only support IP based throttling- Throttling can manage per IP using the throttle policy
| Fields inherited from class org.apache.synapse.mediators.AbstractMediator |
log, trace, traceState |
| Methods inherited from class org.apache.synapse.mediators.AbstractMediator |
auditLog, auditWarn, configure, disableStatistics, enableStatistics, getAspectConfiguration, getDescription, getInputType, getLog, getMediatorPosition, getOutputType, getShortDescription, getTraceState, getType, handleException, handleException, isStatisticsEnable, isTraceOn, isTraceOrDebugOn, setDescription, setEffectiveTraceState, setMediatorPosition, setShortDescription, setTraceState, shouldTrace, traceOrDebug, traceOrDebugWarn |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ThrottleMediator
public ThrottleMediator()
init
public void init(org.apache.synapse.core.SynapseEnvironment se)
- Specified by:
init in interface org.apache.synapse.ManagedLifecycle
destroy
public void destroy()
- Specified by:
destroy in interface org.apache.synapse.ManagedLifecycle
mediate
public boolean mediate(org.apache.synapse.MessageContext synCtx)
- Specified by:
mediate in interface org.apache.synapse.Mediator
mediate
public boolean mediate(org.apache.synapse.MessageContext synCtx,
org.apache.synapse.ContinuationState continuationState)
- Specified by:
mediate in interface org.apache.synapse.mediators.FlowContinuableMediator
getPolicyKey
public String getPolicyKey()
- To get the policy key - The key for which will used to lookup policy from the registry
- Returns:
- String
setPolicyKey
public void setPolicyKey(String policyKey)
- To set the policy key - The key for which lookup from the registry
- Parameters:
policyKey - Value for picking policy from the registry
getInLinePolicy
public org.apache.axiom.om.OMElement getInLinePolicy()
- getting throttle policy which has defined as InLineXML
- Returns:
- InLine Throttle Policy
setInLinePolicy
public void setInLinePolicy(org.apache.axiom.om.OMElement inLinePolicy)
- setting throttle policy which has defined as InLineXML
- Parameters:
inLinePolicy - Inline policy
getOnRejectSeqKey
public String getOnRejectSeqKey()
setOnRejectSeqKey
public void setOnRejectSeqKey(String onRejectSeqKey)
getOnRejectMediator
public org.apache.synapse.Mediator getOnRejectMediator()
setOnRejectMediator
public void setOnRejectMediator(org.apache.synapse.Mediator onRejectMediator)
getOnAcceptSeqKey
public String getOnAcceptSeqKey()
setOnAcceptSeqKey
public void setOnAcceptSeqKey(String onAcceptSeqKey)
getOnAcceptMediator
public org.apache.synapse.Mediator getOnAcceptMediator()
setOnAcceptMediator
public void setOnAcceptMediator(org.apache.synapse.Mediator onAcceptMediator)
getId
public String getId()
setId
public void setId(String id)
isContentAware
public boolean isContentAware()
- Specified by:
isContentAware in interface org.apache.synapse.Mediator- Overrides:
isContentAware in class org.apache.synapse.mediators.AbstractMediator
Copyright © 2005–2015 Apache Software Foundation. All rights reserved.