public class HSMSSocketManager extends PortManager
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PASSIVE_ID
The id we use for passive connections.
|
allIDsValid, cvsRev
Constructor and Description |
---|
HSMSSocketManager(int newPort)
Create an HSMSSocketManger to listen on a particular port.
|
HSMSSocketManager(int newPort,
java.lang.String hostname)
Create an HSMSSocketManger to listen on a particular port.
|
Modifier and Type | Method and Description |
---|---|
int |
available()
Returns the number of bytes available.
|
void |
close()
Close the socket manager.
|
void |
closeListeningSocket()
This will close the socketListener if it exists.
|
int |
currentConnectionCount()
Returns the number of current connections on this socket.
|
int |
getConnectionLimit()
Remove a connection manager from this socket manager.
|
java.lang.String |
getHostName()
Returns the host name.
|
java.lang.String |
getId()
Returns the remoteHostName and port.
|
java.net.InetAddress |
getInetAddress()
Return the inet address of the client socket
|
static LoggerInterface |
getInitialLogger() |
int |
getPort()
Gets the port for the server to listen on.
|
int |
read(byte[] b,
int off,
int len)
Read the socket.
|
void |
setConnectionLimit(int newLimit)
Sets the maximum number of allowable connections.
|
static void |
setInitialLogger(LoggerInterface initialLogger) |
void |
setPort(int newPort)
Sets the port for the server to listen on.
|
void |
write(byte[] b)
Writes the array to the socket.
|
addDeviceId, addPortManager, getConnectionManager, getConnectionManagerForId, getLogger, getMessageHandlersForId, getPortManagerForId, getPortManagers, read, removeDeviceId, removePortManager, removeSessionId, setConnectionManager, setLogger, write
public static final java.lang.String PASSIVE_ID
public HSMSSocketManager(int newPort)
public HSMSSocketManager(int newPort, java.lang.String hostname) throws java.io.IOException
java.io.IOException
public int available() throws java.io.IOException
available
in class PortManager
java.io.IOException
public void close() throws java.io.IOException
close
in class PortManager
java.io.IOException
public void closeListeningSocket() throws java.io.IOException
java.io.IOException
public int currentConnectionCount()
public int getConnectionLimit()
HSMSConnectionManager
public java.lang.String getHostName()
public java.lang.String getId()
getId
in class PortManager
public java.net.InetAddress getInetAddress()
public static LoggerInterface getInitialLogger()
public int getPort()
getPort
in class PortManager
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class PortManager
java.io.IOException
read
public void setConnectionLimit(int newLimit)
public static void setInitialLogger(LoggerInterface initialLogger)
initialLogger
- The initialLogger to set.public void setPort(int newPort)
setPort
in class PortManager
public void write(byte[] b) throws java.io.IOException
write
in class PortManager
java.io.IOException
Copyright © 1999-2025 ErgoTech Systems, Inc. All Rights Reserved.