Class InetPortValidator

java.lang.Object
com.github.joschi.jadconfig.validators.InetPortValidator
All Implemented Interfaces:
Validator<Integer>

public class InetPortValidator extends Object implements Validator<Integer>
Validator class which checks if the named parameter is a valid UDP/TCP port (0-65535).
Author:
jschalanda
  • Constructor Details

    • InetPortValidator

      public InetPortValidator()
  • Method Details

    • validate

      public void validate(String name, Integer value) throws ValidationException
      Validates if the value value the of provided configuration parameter name is a valid UDP/TCP port (0-65535)
      Specified by:
      validate in interface Validator<Integer>
      Parameters:
      name - The name of the configuration parameter
      value - The value of the configuration validator
      Throws:
      ValidationException - If the value value configuration parameter name can't be parsed as an int or is not in the range of 0-65535.