Package com.dynatrace.openkit.protocol
Class StatusResponse
- java.lang.Object
-
- com.dynatrace.openkit.protocol.StatusResponse
-
public class StatusResponse extends java.lang.ObjectImplements a status response which is sent for the request types status check and beacon send.
-
-
Field Summary
Fields Modifier and Type Field Description static intHTTP_BAD_REQUESTBad request is error code 400 in the HTTP protocol.static intHTTP_OKResponse code sent by HTTP server to indicate success.static intHTTP_TOO_MANY_REQUESTSToo many requests sent by client (rate limiting) error code.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StatusResponsecreateErrorResponse(Logger logger, int responseCode)static StatusResponsecreateErrorResponse(Logger logger, int responseCode, java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers)static StatusResponsecreateSuccessResponse(Logger logger, ResponseAttributes responseAttributes, int responseCode, java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers)ResponseAttributesgetResponseAttributes()Returns the attributes received as response from the server.intgetResponseCode()longgetRetryAfterInMilliseconds()booleanisErroneousResponse()
-
-
-
Field Detail
-
HTTP_OK
public static final int HTTP_OK
Response code sent by HTTP server to indicate success.- See Also:
- Constant Field Values
-
HTTP_BAD_REQUEST
public static final int HTTP_BAD_REQUEST
Bad request is error code 400 in the HTTP protocol.- See Also:
- Constant Field Values
-
HTTP_TOO_MANY_REQUESTS
public static final int HTTP_TOO_MANY_REQUESTS
Too many requests sent by client (rate limiting) error code.- See Also:
- Constant Field Values
-
-
Method Detail
-
createSuccessResponse
public static StatusResponse createSuccessResponse(Logger logger, ResponseAttributes responseAttributes, int responseCode, java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers)
-
createErrorResponse
public static StatusResponse createErrorResponse(Logger logger, int responseCode)
-
createErrorResponse
public static StatusResponse createErrorResponse(Logger logger, int responseCode, java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers)
-
isErroneousResponse
public boolean isErroneousResponse()
-
getResponseCode
public int getResponseCode()
-
getResponseAttributes
public ResponseAttributes getResponseAttributes()
Returns the attributes received as response from the server.
-
getRetryAfterInMilliseconds
public long getRetryAfterInMilliseconds()
-
-