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, writepublic 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.IOExceptionpublic int available()
throws java.io.IOException
available in class PortManagerjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in class PortManagerjava.io.IOExceptionpublic void closeListeningSocket()
throws java.io.IOException
java.io.IOExceptionpublic int currentConnectionCount()
public int getConnectionLimit()
HSMSConnectionManagerpublic java.lang.String getHostName()
public java.lang.String getId()
getId in class PortManagerpublic java.net.InetAddress getInetAddress()
public static LoggerInterface getInitialLogger()
public int getPort()
getPort in class PortManagerpublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class PortManagerjava.io.IOExceptionreadpublic void setConnectionLimit(int newLimit)
public static void setInitialLogger(LoggerInterface initialLogger)
initialLogger - The initialLogger to set.public void setPort(int newPort)
setPort in class PortManagerpublic void write(byte[] b)
throws java.io.IOException
write in class PortManagerjava.io.IOExceptionCopyright © 1999-2025 ErgoTech Systems, Inc. All Rights Reserved.