Package org.apache.cxf.throttling
Class SimpleThrottlingManager
- java.lang.Object
-
- org.apache.cxf.throttling.ThrottleResponse
-
- org.apache.cxf.throttling.SimpleThrottlingManager
-
- All Implemented Interfaces:
ThrottlingManager
public class SimpleThrottlingManager extends ThrottleResponse implements ThrottlingManager
Suspends or aborts the requests if the threshold has been reached
-
-
Field Summary
-
Fields inherited from class org.apache.cxf.throttling.ThrottleResponse
delay, errorMessage, responseCode, responseHeaders
-
-
Constructor Summary
Constructors Constructor Description SimpleThrottlingManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>getDecisionPhases()Get the list of phases where this manager will expect to have to make throttling decisions.intgetThreshold()ThrottleResponsegetThrottleResponse(String phase, Message m)Use information in the message to determine what throttling measures should be takenvoidsetThreshold(int threshold)-
Methods inherited from class org.apache.cxf.throttling.ThrottleResponse
addResponseHeader, getDelay, getErrorMessage, getResponseCode, getResponseHeaders, setDelay, setResponseCode, setResponseCode
-
-
-
-
Method Detail
-
getDecisionPhases
public List<String> getDecisionPhases()
Description copied from interface:ThrottlingManagerGet the list of phases where this manager will expect to have to make throttling decisions. For example: using BasicAuth or other protocol based header, it can be a very early in the chain, but for WS-Security based authentication, it would be later.- Specified by:
getDecisionPhasesin interfaceThrottlingManager- Returns:
-
getThrottleResponse
public ThrottleResponse getThrottleResponse(String phase, Message m)
Description copied from interface:ThrottlingManagerUse information in the message to determine what throttling measures should be taken- Specified by:
getThrottleResponsein interfaceThrottlingManager- Returns:
-
getThreshold
public int getThreshold()
-
setThreshold
public void setThreshold(int threshold)
-
-