public class SocketRepository extends Object
Constructor and Description |
---|
SocketRepository(LogChannelInterface log) |
Modifier and Type | Method and Description |
---|---|
void |
closeAll()
Closes all sockets on application end...
|
protected void |
finalize() |
Map<Integer,SocketRepositoryEntry> |
getSocketMap() |
ServerSocket |
openServerSocket(int port,
String user) |
void |
releaseSocket(int port)
We don't actually ever close a server socket, we re-use them as much as possible.
|
void |
setSocketMap(Map<Integer,SocketRepositoryEntry> socketMap) |
public SocketRepository(LogChannelInterface log)
public ServerSocket openServerSocket(int port, String user) throws IOException
IOException
public void releaseSocket(int port) throws IOException
port
- IOException
public Map<Integer,SocketRepositoryEntry> getSocketMap()
public void setSocketMap(Map<Integer,SocketRepositoryEntry> socketMap)
socketMap
- the socketMap to setpublic void closeAll()
IOException
- in case there is an errorCopyright © 2018 Hitachi Vantara. All rights reserved.