Class EmptyContentValidator

  • All Implemented Interfaces:
    Validator

    public class EmptyContentValidator
    extends 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.

    Author:
    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
        Parameters:
        request - request sent to fetch a response
        response - response fetched
        Returns:
        the status of validation