static class LowLevelSocketImpl.SocketData
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) int |
id
The ID of this socket, on P2J client-side.
|
private LowLevelSocketImpl.StagedInput |
input
A specialized instance dedicated to reading data from the socket, in a separate thread.
|
private LowLevelSocketImpl.ReadListener |
listener
Listener dedicated to posting READ-RESPONSE events.
|
private java.io.OutputStream |
output
This socket's output stream.
|
private java.util.concurrent.CountDownLatch |
ready
Signals when all the threads have started.
|
(package private) long |
resourceId
The ID of this
Socket resource, on P2J server-side. |
private java.net.Socket |
socket
The associated socket.
|
private java.lang.String |
sslServerName
The SSL server name, in case of a SSL connection.
|
Constructor and Description |
---|
SocketData(int id,
long resourceId,
java.net.Socket socket,
java.lang.String sslServerName)
Save the data for this socket and create the specialized instances to
raise READ-RESPONSE events and to read data from
the socket. |
SocketData(int id,
java.net.Socket socket,
java.lang.String sslServerName)
Save the data for this socket and create the specialized instances to
raise READ-RESPONSE events and to read data from
the socket. |
Modifier and Type | Method and Description |
---|---|
void |
startThreads()
|
final int id
final long resourceId
Socket
resource, on P2J server-side.private final java.util.concurrent.CountDownLatch ready
private final java.net.Socket socket
private final java.lang.String sslServerName
private final LowLevelSocketImpl.ReadListener listener
private final LowLevelSocketImpl.StagedInput input
private final java.io.OutputStream output
public SocketData(int id, java.net.Socket socket, java.lang.String sslServerName) throws java.io.IOException
raise READ-RESPONSE events
and to read data
from
the socket.id
- The ID of the associated socket on P2J Client side.socket
- The associated java socket.sslServerName
- The SSL server name, in case of a SSL connection. null
otherwise.java.io.IOException
- If the socket's input or output streams couldn't be obtained.public SocketData(int id, long resourceId, java.net.Socket socket, java.lang.String sslServerName) throws java.io.IOException
raise READ-RESPONSE events
and to read data
from
the socket.id
- The ID of the associated socket on P2J Client side.resourceId
- The ID of the associated Socket
on P2J Server
side.socket
- The associated java socket.sslServerName
- The SSL server name, in case of a SSL connection. null
otherwise.java.io.IOException
- If the socket's input or output streams couldn't be obtained.