class NIOSslSocket extends NIONetSocketBase
NetSocket.NetSocketFactory| Modifier and Type | Field and Description |
|---|---|
protected ByteArrayHandler |
byteArrayHandler
Input byte stream splitter
|
protected javax.net.ssl.SSLEngine |
engine
SSLEngine
|
protected static CentralLogger |
LOG
Logger
|
protected java.util.concurrent.BlockingQueue<byte[]> |
queue
Input chunks' queue
|
protected SSL |
ssl
SSL Provider
|
protected java.util.concurrent.ExecutorService |
sslFsmWorkers
Auxiliary executor service
|
protected static java.util.concurrent.atomic.AtomicInteger |
THREAD_COUNT |
channelTRACE_LMBUF_SIZE, FACTORY, handshakeTimeout| Constructor and Description |
|---|
NIOSslSocket(javax.net.ssl.SSLEngine engine,
java.nio.channels.SocketChannel channel)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the socket.
|
protected int |
getMaxMessageSize()
Get maximal message size
|
javax.net.ssl.SSLSession |
getSession()
Gets the SSL session.
|
protected byte[] |
readFully()
Read next data chunk from the channel
|
protected void |
write(java.nio.ByteBuffer bb)
Send the data to the channel
|
getLocalAddr, getLocalSockAddr, getRemoteAddr, getRemoteSockAddr, isClosed, read, readBoolean, readBytes, readInt, readUTF, write, writeBoolean, writeBytes, writeInt, writeUTFaddSessionListener, getSessionListenersclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddSessionListener, flush, getSessionListeners, tracef, tracelnprotected static final CentralLogger LOG
protected static final java.util.concurrent.atomic.AtomicInteger THREAD_COUNT
protected final javax.net.ssl.SSLEngine engine
protected final SSL ssl
protected final java.util.concurrent.BlockingQueue<byte[]> queue
protected final java.util.concurrent.ExecutorService sslFsmWorkers
protected final ByteArrayHandler byteArrayHandler
public NIOSslSocket(javax.net.ssl.SSLEngine engine,
java.nio.channels.SocketChannel channel)
throws java.io.IOException
engine - SSL Enginechannel - underlying SocketChanneljava.io.IOException - on errorpublic void close()
close in interface NetSocketclose in class NIONetSocketBasepublic javax.net.ssl.SSLSession getSession()
null if the socket is not
secure.protected void write(java.nio.ByteBuffer bb)
throws java.io.IOException
write in class NIONetSocketBasebb - data to be sentjava.io.IOException - on errorprotected byte[] readFully()
throws java.io.IOException,
java.io.EOFException
readFully in class NIONetSocketBasejava.io.IOException - on errorjava.io.EOFException - if no data can be readprotected int getMaxMessageSize()
getMaxMessageSize in class NIONetSocketBase