Package org.apache.cxf.throttling
Class SimpleThrottlingManager
java.lang.Object
org.apache.cxf.throttling.ThrottleResponse
org.apache.cxf.throttling.SimpleThrottlingManager
- All Implemented Interfaces:
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 -
Method Summary
Modifier and TypeMethodDescriptionGet the list of phases where this manager will expect to have to make throttling decisions.intgetThrottleResponse(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
-
Constructor Details
-
SimpleThrottlingManager
public SimpleThrottlingManager()
-
-
Method Details
-
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
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)
-