Package org.apache.cxf.throttling
Class ThrottleResponse
java.lang.Object
org.apache.cxf.throttling.ThrottleResponse
- Direct Known Subclasses:
SimpleThrottlingManager
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionThrottleResponse(int responceCode) ThrottleResponse(int responceCode, long delay) -
Method Summary
Modifier and TypeMethodDescriptionaddResponseHeader(String header, String value) Add headers to the response.longgetDelay()Delay processing for specified milliseconds.intsetDelay(long d) setResponseCode(int rc) setResponseCode(int rc, String msg)
-
Field Details
-
delay
protected long delay -
responseHeaders
-
responseCode
protected int responseCode -
errorMessage
-
-
Constructor Details
-
ThrottleResponse
public ThrottleResponse() -
ThrottleResponse
public ThrottleResponse(int responceCode) -
ThrottleResponse
public ThrottleResponse(int responceCode, long delay)
-
-
Method Details
-
getResponseHeaders
-
addResponseHeader
Add headers to the response. Typically, this would be things like X-RateLimit-Limit headers- Returns:
-
getResponseCode
public int getResponseCode() -
getErrorMessage
-
setResponseCode
-
setResponseCode
-
getDelay
public long getDelay()Delay processing for specified milliseconds. Should be "small" to prevent the client from timing out unless the client request is aborted with the HTTP error code.- Returns:
-
setDelay
-