Class PortEarlyPropertyChecker

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void checkPort​(int portNumber, java.lang.String host)  
      void checkPropertyValue​(java.lang.String propertyName, java.lang.String propertyValue, java.lang.String pairedPropertyValue)
      Implementation of checkPropertyValue() method for port checking.
      java.lang.String getPairedPropertyName()
      Get the (optional) paired property name (e.g., if we want to check a port number we might want to do that together with a specific local address).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PortEarlyPropertyChecker

        public PortEarlyPropertyChecker​(java.lang.String subsystemName,
                                        boolean hasMultiplePorts,
                                        boolean shouldCheckForBlockedPort)
        Create a new PortEarlyPropertyChecker w/o a paired property name.
        Parameters:
        subsystemName - Name of the subsystem; used for custom error messages.
        hasMultiplePorts - Specify if the property value that will be checked is a list of ports (they must be separated by ",").
        shouldCheckForBlockedPort - Enable/disable checking for port-already-in-use (i.e.: disable this for remote ports).
      • PortEarlyPropertyChecker

        public PortEarlyPropertyChecker​(java.lang.String subsystemName,
                                        java.lang.String requiredPairedPropertyName,
                                        boolean hasMultiplePorts,
                                        boolean shouldCheckForBlockedPort)
        Parameters:
        subsystemName - Name of the subsystem; used for custom error messages.
        requiredPairedPropertyName - Name of the required paired property (see SubsystemEarlyPropertyChecker.getPairedPropertyName()).
        hasMultiplePorts - Specify if the property value that will be checked is a list of ports (they must be separated by ",").
        shouldCheckForBlockedPort - Enable/disable checking for port-already-in-use (i.e.: disable this for remote ports).
    • Method Detail

      • checkPropertyValue

        public void checkPropertyValue​(java.lang.String propertyName,
                                       java.lang.String propertyValue,
                                       java.lang.String pairedPropertyValue)
                                throws InvalidPropertyValueException
        Implementation of checkPropertyValue() method for port checking.
        Specified by:
        checkPropertyValue in interface SubsystemEarlyPropertyChecker
        Parameters:
        propertyName - Name of the property.
        propertyValue - Port value; if this contains multiple ports they must be separated by ",".
        pairedPropertyValue - - Value of the paired property
        Throws:
        InvalidPropertyValueException - Raised if any of the checks fail.
      • checkPort

        protected void checkPort​(int portNumber,
                                 java.lang.String host)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • getPairedPropertyName

        public java.lang.String getPairedPropertyName()
        Description copied from interface: SubsystemEarlyPropertyChecker
        Get the (optional) paired property name (e.g., if we want to check a port number we might want to do that together with a specific local address).
        Specified by:
        getPairedPropertyName in interface SubsystemEarlyPropertyChecker
        Returns:
        The paired property name.