public class SocketClientConnectionListener extends Object implements ClientConnectionInterface
Constructor and Description |
---|
SocketClientConnectionListener(PortManager portManager)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
closeClientListener()
Closes and disposes of the connection listener.
|
void |
createClientListener(IniFile ini,
String name)
Creates the server socket that will listens to incoming
client connections.
|
InetAddress |
getBindAddress()
Gets the bind address for the port.
|
String |
getID()
Gets the name (ID) of the port.
|
int |
getLocalPort()
Gets the physical local port number.
|
int |
getMapToPort()
Gets the port number being mapped to.
|
String |
getSSLSection()
Gets the SSL section.
|
ServerSocketInterface3 |
getSSLServerSocketInterface()
Gets the server socket interface for pure SSL connections.
|
boolean |
isClosed()
Checks if a connection is closed.
|
boolean |
isLoadBalanced()
Checks if this listener is load balanced or not.
|
boolean |
isStarted()
Checks if a connection is started.
|
boolean |
isUsingSSL()
Returns if SSL is used or not.
|
boolean |
startClientListener(ClientConnectionListener listener)
This method starts listening for connections.
|
boolean |
stopClientListener()
This method stops listening for connections.
|
boolean |
useExternalSSL()
Gets the external SSL flag.
|
boolean |
usesSSLDomains(String sslSection)
Checks if the port uses domains with SSL (not external).
|
boolean |
usesSSLWithoutDomains(String sslSection)
Checks if the port has no domains with SSL (not external).
|
public SocketClientConnectionListener(PortManager portManager)
portManager
- The port manager instance.public void createClientListener(IniFile ini, String name) throws IOException
The following values are read from the [Port] section of the ini file:
createClientListener
in interface ClientConnectionInterface
IOException
- if an I/O error occurs.public InetAddress getBindAddress()
public boolean startClientListener(ClientConnectionListener listener) throws IOException
startClientListener
in interface ClientConnectionInterface
IOException
- if an I/O error occurs.public boolean stopClientListener()
stopClientListener
in interface ClientConnectionInterface
public void closeClientListener()
closeClientListener
in interface ClientConnectionInterface
public boolean isStarted()
isStarted
in interface ClientConnectionInterface
public boolean isLoadBalanced()
isLoadBalanced
in interface ClientConnectionInterface
public boolean isUsingSSL()
isUsingSSL
in interface ClientConnectionInterface
public String getID()
getID
in interface ClientConnectionInterface
public int getLocalPort()
getLocalPort
in interface ClientConnectionInterface
public int getMapToPort()
getMapToPort
in interface ClientConnectionInterface
public boolean isClosed()
isClosed
in interface ClientConnectionInterface
public String getSSLSection()
public boolean useExternalSSL()
public boolean usesSSLDomains(String sslSection)
sslSection
- The section that should match.public boolean usesSSLWithoutDomains(String sslSection)
sslSection
- The section that should match.public ServerSocketInterface3 getSSLServerSocketInterface()
null
for plain sockets or
external SSL sockets, or if the server socket is not created.Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.