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 java.util.logging.Logger |
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 |
channel
TRACE_LM
BUF_SIZE, FACTORY, handshakeTimeout, TRACE
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, writeUTF
addSessionListener, getSessionListeners
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addSessionListener, flush, getSessionListeners, tracef, traceln
protected static final java.util.logging.Logger 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 NetSocket
close
in class NIONetSocketBase
public 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 NIONetSocketBase
bb
- data to be sentjava.io.IOException
- on errorprotected byte[] readFully() throws java.io.IOException, java.io.EOFException
readFully
in class NIONetSocketBase
java.io.IOException
- on errorjava.io.EOFException
- if no data can be readprotected int getMaxMessageSize()
getMaxMessageSize
in class NIONetSocketBase