Package org.pentaho.platform.settings
Class ServerPort
- java.lang.Object
-
- org.pentaho.platform.settings.ServerPort
-
- Direct Known Subclasses:
KarafInstancePort
public class ServerPort extends Object
This immutable class contains information on variable port that is assigned by this class. This class will use thePortAssignerto assign a port from the defined range, when the#assignPort()is called. The port will be considered reserved for the duration of JVM, unless thereleasePort()is called.- Author:
- tkafalas
-
-
Constructor Summary
Constructors Constructor Description ServerPort(String id, String friendlyName, Integer startPort)ServerPort(String id, String friendlyName, Integer startPort, String serviceName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntegergetAssignedPort()StringgetFriendlyName()StringgetId()StringgetServiceName()IntegergetStartPort()voidreleasePort()Free's up the port resource for re-use.voidsetAssignedPort(Integer assignedPort)protected voidsetFriendlyName(String friendlyName)
-
-
-
Constructor Detail
-
ServerPort
public ServerPort(String id, String friendlyName, Integer startPort)
- 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
public ServerPort(String id, String friendlyName, Integer startPort, String serviceName)
- 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 Detail
-
getId
public String getId()
-
getAssignedPort
public Integer getAssignedPort()
-
setAssignedPort
public void setAssignedPort(Integer assignedPort)
-
getFriendlyName
public String getFriendlyName()
-
setFriendlyName
protected void setFriendlyName(String friendlyName)
-
getStartPort
public Integer getStartPort()
-
getServiceName
public String getServiceName()
-
releasePort
public void releasePort()
Free's up the port resource for re-use. Call this method when the port can be reused.
-
-