Package com.iizix.comm
Class SocketComm
java.lang.Object
com.iizix.nio.SocketCommNIO
com.iizix.comm.SocketComm
- All Implemented Interfaces:
ISocketComm
,IWorkerTimeout
The SocketComm class is used to open client sockets with a destination host with optional proxy (HTTP/SOCKS), secure socket (SSL/TLS), and atop WebSocket or Telnet as protocols.
For proxy and/or WebSocket, an authenticator must/should be used to support user authentication with the proxy or destination (for WebSocket).
For SSL/TLS, client certificates can be added, discrete or from system, and if so, an password callback might be have to be registered to provide a password for a keystore or a certificate, unless preset in the properties.
For SSL/TLS, server certificates validator can be provided in order to check server certificates and/or the destinations host name.
- Author:
- Christopher Mindus
Field Summary
Fields inherited from class com.iizix.nio.SocketCommNIO
bindAddress, doResolveHostNames, host, port
Constructor Summary
ConstructorDescriptionSocketComm
(SocketCommProps properties, Worker worker, SocketCommListener listener, SSLEngine engine) Creates a new Socket Client Communication channel as UNINITIALIZED.Method Summary
Methods inherited from class com.iizix.nio.SocketCommNIO
checkTimeout, close, close, enterSecureMode, getNonConnectedReadTimeout, getReadTimeout, getRemainingTimeout, getRemoteAddr, getRemoteHost, getSocketAddress, getSSLCommLayer, getState, getWriteTimeout, hasBeenOpen, isClosed, isSecure, open, process, send, setLogger, setNonConnectedReadTimeout, setReadTimeout, setupSocket, setWriteTimeout
Field Details
properties
The properties for the socket.
Constructor Details
SocketComm
public SocketComm(SocketCommProps properties, Worker worker, SocketCommListener listener, SSLEngine engine) Creates a new Socket Client Communication channel as UNINITIALIZED.- Parameters:
properties
- The socket properties.worker
- The worker thread for socket processing.listener
- The listener for socket events.engine
- The SSL engine or null for plain connection.