public class PortManager extends Object
Constructor and Description |
---|
PortManager(IniFile ini,
int clusterServerNumber)
Creates the listeners on the ports specified in [Port] section
in item 'portID'.
|
Modifier and Type | Method and Description |
---|---|
void |
closeClientListener()
Closes and disposes of the connection listener.
|
boolean |
closeClientListener(String name)
Closes and disposes of the connection listener.
|
boolean |
closeClientListener(String name,
boolean doRemove)
Closes and disposes of the connection listener.
|
boolean |
createClientListener(String name)
Create a port listener.
|
boolean |
createClientListenerEx(String name)
Create a port listener.
|
SocketClientConnectionListener[] |
getAllPorts()
Gets an array of all the ports.
|
Transaction |
getAvailablePorts(Transaction trans)
Gets the ports available for load balancing.
|
int |
getDefaultSSLPort()
Gets the default port number to use for SSL.
|
LetsEncryptDomain |
getLetsEncryptDomain(String domain)
Gets a Let's Encrypt domain instance.
|
int |
getPortState(String name)
Checks if the port state.
|
boolean |
isClosed(String name)
Checks if a port is started.
|
boolean |
isStarted(String name)
Checks if a port is started.
|
boolean |
isStopped(String name)
Checks if a port is started.
|
void |
startClientListener(ClientConnectionListener listener)
This method starts listening for connections.
|
void |
startClientListener(ClientConnectionListener listener,
int errorMessageID)
This method starts listening for connections.
|
boolean |
startClientListener(String name)
Starts listening for connections.
|
void |
stopClientListener()
Stops listening for connections.
|
boolean |
stopClientListener(String name)
Stops listening for connections.
|
public PortManager(IniFile ini, int clusterServerNumber) throws IOException
IOException
- for listener creation error.public LetsEncryptDomain getLetsEncryptDomain(String domain)
public boolean createClientListenerEx(String name) throws IOException
IOException
- for failures.public boolean createClientListener(String name)
public void startClientListener(ClientConnectionListener listener) throws IOException
IOException
- if an I/O error occurs.public void startClientListener(ClientConnectionListener listener, int errorMessageID)
public boolean startClientListener(String name) throws IOException
IOException
- if an I/O error occurs.public void stopClientListener()
public boolean stopClientListener(String name)
public void closeClientListener()
public boolean closeClientListener(String name)
public boolean closeClientListener(String name, boolean doRemove)
public int getPortState(String name)
name
- the port ID name (it is made upper case).public boolean isStarted(String name)
public boolean isStopped(String name)
public boolean isClosed(String name)
public Transaction getAvailablePorts(Transaction trans)
public SocketClientConnectionListener[] getAllPorts()
public int getDefaultSSLPort()
Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.