Class StatusOkValidator

  • All Implemented Interfaces:

    public class StatusOkValidator
    extends java.lang.Object
    implements Validator
    This class determines the validity of a response by its status code.

    A code 200 should return Status.VALID, or Status.INVALID_CONTENT otherwise.

    Maksim Tkachenko, Ween Jiann Lee
    • Field Detail

      • INSTANCE

        public static final StatusOkValidator INSTANCE
        An instance of this validator.
    • Constructor Detail

      • StatusOkValidator

        public StatusOkValidator()
    • Method Detail

      • isValid

        public final Validator.Status isValid​(Request request,
                                              Response response)
        Description copied from interface: Validator
        Method will be called when a response need validation.
        Specified by:
        isValid in interface Validator
        request - request sent to fetch a response
        response - response fetched
        the status of validation