public class ServerPort extends Object
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.Constructor and Description |
---|
ServerPort(String id,
String friendlyName,
Integer startPort) |
ServerPort(String id,
String friendlyName,
Integer startPort,
String serviceName) |
Modifier and Type | Method and Description |
---|---|
Integer |
getAssignedPort() |
String |
getFriendlyName() |
String |
getId() |
String |
getServiceName() |
Integer |
getStartPort() |
void |
releasePort()
Free's up the port resource for re-use.
|
void |
setAssignedPort(Integer assignedPort) |
protected void |
setFriendlyName(String friendlyName) |
public ServerPort(String id, String friendlyName, Integer startPort)
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.public ServerPort(String id, String friendlyName, Integer startPort, String serviceName)
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 portpublic String getId()
public Integer getAssignedPort()
public void setAssignedPort(Integer assignedPort)
public String getFriendlyName()
protected void setFriendlyName(String friendlyName)
public Integer getStartPort()
public String getServiceName()
public void releasePort()
Copyright © 2017 Hitachi Vantara. All rights reserved.