Package org.pentaho.platform.settings
Class ServerPort
java.lang.Object
org.pentaho.platform.settings.ServerPort
- Direct Known Subclasses:
KarafInstancePort
This immutable class contains information on variable port that is assigned by this class. This class will use the
PortAssigner
to assign a port from the defined range, when the #assignPort()
is called. The port
will be considered reserved for the duration of JVM, unless the releasePort()
is called.- Author:
- tkafalas
-
Constructor Summary
ConstructorDescriptionServerPort
(String id, String friendlyName, Integer startPort) ServerPort
(String id, String friendlyName, Integer startPort, String serviceName) -
Method Summary
Modifier and TypeMethodDescriptiongetId()
void
Free's up the port resource for re-use.void
setAssignedPort
(Integer assignedPort) protected void
setFriendlyName
(String friendlyName)
-
Constructor Details
-
ServerPort
- Parameters:
id
- A unique Id associated with this portfriendlyName
- A friendly descriptive name associated with this portstartPort
- The first port number in a range of available ports. If null an unused port ill be assigned.
-
ServerPort
- Parameters:
id
- A unique Id associated with this portfriendlyName
- A friendly descriptive name associated with this portstartPort
- The first port number in a range of available ports. If null an unused port ill be assigned.serviceName
- The serviceName associated with this port
-
-
Method Details
-
getId
-
getAssignedPort
-
setAssignedPort
-
getFriendlyName
-
setFriendlyName
-
getStartPort
-
getServiceName
-
releasePort
public void releasePort()Free's up the port resource for re-use. Call this method when the port can be reused.
-