Class PortEarlyPropertyChecker
java.lang.Object
org.alfresco.repo.management.subsystems.PortEarlyPropertyChecker
- All Implemented Interfaces:
SubsystemEarlyPropertyChecker
"Early" checker for Port property value (checks for "null/empty", "out-of-bounds", "unable-to-parse", "already-in-use" problems).
Also see the implemented interface
SubsystemEarlyPropertyChecker- Author:
- abalmus
-
Constructor Summary
ConstructorsConstructorDescriptionPortEarlyPropertyChecker(String subsystemName, boolean hasMultiplePorts, boolean shouldCheckForBlockedPort) Create a newPortEarlyPropertyCheckerw/o a paired property name.PortEarlyPropertyChecker(String subsystemName, String requiredPairedPropertyName, boolean hasMultiplePorts, boolean shouldCheckForBlockedPort) Create a newPortEarlyPropertyChecker. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidcheckPropertyValue(String propertyName, String propertyValue, String pairedPropertyValue) Implementation of checkPropertyValue() method for port checking.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).
-
Constructor Details
-
PortEarlyPropertyChecker
public PortEarlyPropertyChecker(String subsystemName, boolean hasMultiplePorts, boolean shouldCheckForBlockedPort) Create a newPortEarlyPropertyCheckerw/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(String subsystemName, String requiredPairedPropertyName, boolean hasMultiplePorts, boolean shouldCheckForBlockedPort) Create a newPortEarlyPropertyChecker.- Parameters:
subsystemName- Name of the subsystem; used for custom error messages.requiredPairedPropertyName- Name of the required paired property (seeSubsystemEarlyPropertyChecker.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 Details
-
checkPropertyValue
public void checkPropertyValue(String propertyName, String propertyValue, String pairedPropertyValue) throws InvalidPropertyValueException Implementation of checkPropertyValue() method for port checking.- Specified by:
checkPropertyValuein interfaceSubsystemEarlyPropertyChecker- 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
- Throws:
IOException
-
getPairedPropertyName
Description copied from interface:SubsystemEarlyPropertyCheckerGet 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:
getPairedPropertyNamein interfaceSubsystemEarlyPropertyChecker- Returns:
- The paired property name.
-