Class EmptyContentValidator

  • All Implemented Interfaces:

    public class EmptyContentValidator
    extends java.lang.Object
    implements Validator
    This class determines the validity of a response by its content length.

    An empty content should return Status.INVALID_CONTENT, or Status.VALID otherwise.

    Maksim Tkachenko, Ween Jiann Lee
    • Constructor Detail

      • EmptyContentValidator

        public EmptyContentValidator()
    • 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