private static class LowLevelSocketImpl.WorkArea
extends java.lang.Object
socket registry
.Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.Integer,LowLevelSocketImpl.SocketData> |
sockets
A registry containing the open sockets.
|
Modifier | Constructor and Description |
---|---|
private |
WorkArea() |
Modifier and Type | Method and Description |
---|---|
void |
addSocket(int id,
LowLevelSocketImpl.SocketData sd)
Add a new socket to the
registry . |
private LowLevelSocketImpl.SocketData |
locate(int id)
Locate the
LowLevelSocketImpl.SocketData for the the given ID. |
private java.net.Socket |
locateSocket(int id)
Locate the socket with the given ID from the
registry . |
private void |
removeSocket(int id)
Remove the socket with the given ID from the
registry . |
private final java.util.Map<java.lang.Integer,LowLevelSocketImpl.SocketData> sockets
public void addSocket(int id, LowLevelSocketImpl.SocketData sd)
registry
.id
- The ID of the associated socket on P2J Client side.sd
- The data for this socket.private java.net.Socket locateSocket(int id)
registry
.id
- The ID of the associated socket on P2J Client side.private LowLevelSocketImpl.SocketData locate(int id)
LowLevelSocketImpl.SocketData
for the the given ID.id
- The ID of the associated socket on P2J Client side.private void removeSocket(int id)
registry
.id
- The ID of the associated socket on P2J Client side.