private static class LowLevelSocketListenerImpl.ConnectListener
extends java.lang.Object
implements java.lang.Runnable
Modifier and Type | Field and Description |
---|---|
private LowLevelSocketListenerImpl.ServerSocketData |
data
Back reference to the data for this server socket.
|
private long |
resourceId
The remote resource ID for this server-socket.
|
Constructor and Description |
---|
ConnectListener(long resourceId,
LowLevelSocketListenerImpl.ServerSocketData data)
Initialize this instance.
|
Modifier and Type | Method and Description |
---|---|
private LowLevelSocketImpl.SocketData |
accept()
Wait for a new incoming connection.
|
void |
run()
Listen for incoming connections, in a different thread.
|
void |
start()
Start a new thread, in which this instance will be executed.
|
private final long resourceId
private final LowLevelSocketListenerImpl.ServerSocketData data
public ConnectListener(long resourceId, LowLevelSocketListenerImpl.ServerSocketData data)
resourceId
- The ID of the resource
on P2J server side.data
- The associated LowLevelSocketListenerImpl.ServerSocketData
.public void run()
run
in interface java.lang.Runnable
public void start()
Server socket listener [%d]
, where %d
is replaced with the
LowLevelSocketImpl.SocketData.id
value.
This thread is marked as async, as all outgoing requests must be processed async, in
their own dispatcher
.
private LowLevelSocketImpl.SocketData accept()
LowLevelSocketImpl.SocketData
for this client socket.