private static class LowLevelSocketImpl.WorkArea extends java.lang.Object implements SessionListener
socket registry.| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<java.lang.String,javax.net.ssl.SSLSocketFactory> |
factories
Map for protocol name : SSL Socket factory pair
|
private boolean |
nohostverify
-nohostverify CONNECT arg, only for SOAP calls.
|
private ServerExports |
server
The proxy to the
ServerExports (which can be local or remote, depending on how the client
sockets are configured. |
private int |
socketConnectTimeoutMs
The socket connect timeout value taken from directory per client session basis.
|
private java.util.Map<java.lang.Integer,LowLevelSocketImpl.SocketData> |
sockets
A registry containing the open sockets.
|
private java.lang.String |
trustStoreFilename
Filename of client-side SSL certificate store.
|
private java.lang.String |
trustStorePassword
The password for access to client-side SSL certificate store.
|
| Constructor and Description |
|---|
WorkArea()
Initialize this instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSocket(int id,
LowLevelSocketImpl.SocketData sd)
Add a new socket to the
registry. |
boolean |
disconnect(int id)
Disconnect this socket.
|
void |
initialize(Session session)
This method is called when the session is starting.
|
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. |
void |
terminate(Session session)
When the P2J client session is ending, disconnect all active sockets.
|
private final java.util.Map<java.lang.String,javax.net.ssl.SSLSocketFactory> factories
private boolean nohostverify
private java.lang.String trustStoreFilename
trusted-cert.store from
current directory.
In P4GL the store is a folder and each imported certificate being a file in PEM (ASCII plain text). They should be imported to this store.
private java.lang.String trustStorePassword
private final java.util.Map<java.lang.Integer,LowLevelSocketImpl.SocketData> sockets
private int socketConnectTimeoutMs
private final ServerExports server
ServerExports (which can be local or remote, depending on how the client
sockets are configured.public boolean disconnect(int id)
id - The ID of the associated socket on P2J Client side.true if no errors were encountered during disconnect.public void terminate(Session session)
terminate in interface SessionListenersession - The session that is ending.public void initialize(Session session)
initialize in interface SessionListenersession - The session that is starting.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.