Class SimpleResponseValidator

    • Constructor Detail

      • SimpleResponseValidator

        public SimpleResponseValidator​(String strList)
        Constructor
        Parameters:
        strList - The list of authorized status
    • Method Detail

      • loadFromProperty

        public static ResponseStatusValidator loadFromProperty​(String strProperty,
                                                               String strDefault)
        Load a Status validator from properties
        Parameters:
        strProperty - The property key
        strDefault - The default value
        Returns:
        A responseValidator initialized with the authorized status list
      • validate

        public boolean validate​(int nStatus)
        Validate response status
        Specified by:
        validate in interface ResponseStatusValidator
        Parameters:
        nStatus - the response status
        Returns:
        true if validated