Class StatusResponse


  • public class StatusResponse
    extends java.lang.Object
    Implements a status response which is sent for the request types status check and beacon send.
    • 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()