Class PortRange


  • public final class PortRange
    extends Object
    Range of port numbers to use as translated ports on each translated address. If not specified and NAPT is enabled, this range defaults to 1,024 - 65,535. (Ports under 1,024 should not be used because these are special purpose ports reserved by IANA.).
    • Constructor Detail

      • PortRange

        public PortRange()
    • Method Detail

      • minPort

        public Integer minPort()
        Get the minPort property: The minimum port number.
        Returns:
        the minPort value.
      • withMinPort

        public PortRange withMinPort​(Integer minPort)
        Set the minPort property: The minimum port number.
        Parameters:
        minPort - the minPort value to set.
        Returns:
        the PortRange object itself.
      • maxPort

        public Integer maxPort()
        Get the maxPort property: The maximum port number.
        Returns:
        the maxPort value.
      • withMaxPort

        public PortRange withMaxPort​(Integer maxPort)
        Set the maxPort property: The maximum port number.
        Parameters:
        maxPort - the maxPort value to set.
        Returns:
        the PortRange object itself.
      • validate

        public void validate()
        Validates the instance.
        Throws:
        IllegalArgumentException - thrown if the instance is not valid.