|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.java_websocket.SSLSocketChannel2
public class SSLSocketChannel2
Implements the relevant portions of the SocketChannel interface with the SSLEngine wrapper.
| Field Summary | |
|---|---|
protected static ByteBuffer |
emptybuffer
|
protected SSLEngineResult |
engineResult
|
protected ExecutorService |
exec
|
protected ByteBuffer |
inCrypt
encrypted data incoming |
protected ByteBuffer |
inData
raw payload incomming |
protected ByteBuffer |
outCrypt
encrypted data outgoing |
protected SelectionKey |
selectionKey
used to set interestOP SelectionKey.OP_WRITE for the underlying channel |
protected SocketChannel |
socketChannel
the underlying channel |
protected SSLEngine |
sslEngine
|
protected List<Future<?>> |
tasks
|
| Constructor Summary | |
|---|---|
SSLSocketChannel2(SocketChannel channel,
SSLEngine sslEngine,
ExecutorService exec,
SelectionKey key)
|
|
| Method Summary | |
|---|---|
void |
close()
|
SelectableChannel |
configureBlocking(boolean b)
|
boolean |
connect(SocketAddress remote)
|
protected void |
consumeDelegatedTasks()
|
protected void |
createBuffers(SSLSession session)
|
boolean |
finishConnect()
|
boolean |
isBlocking()
|
boolean |
isConnected()
|
boolean |
isInboundDone()
|
boolean |
isNeedRead()
returns whether readMore should be called to fetch data which has been decoded but not yet been returned. |
boolean |
isNeedWrite()
|
boolean |
isOpen()
|
int |
read(ByteBuffer dst)
Blocks when in blocking mode until at least one byte has been decoded. When not in blocking mode 0 may be returned. |
int |
readMore(ByteBuffer dst)
This function does not read data from the underlying channel at all. |
Socket |
socket()
|
int |
write(ByteBuffer src)
|
void |
writeMore()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static ByteBuffer emptybuffer
protected ExecutorService exec
protected List<Future<?>> tasks
protected ByteBuffer inData
protected ByteBuffer outCrypt
protected ByteBuffer inCrypt
protected SocketChannel socketChannel
protected SelectionKey selectionKey
protected SSLEngineResult engineResult
protected SSLEngine sslEngine
| Constructor Detail |
|---|
public SSLSocketChannel2(SocketChannel channel,
SSLEngine sslEngine,
ExecutorService exec,
SelectionKey key)
throws IOException
IOException| Method Detail |
|---|
protected void consumeDelegatedTasks()
protected void createBuffers(SSLSession session)
public int write(ByteBuffer src)
throws IOException
write in interface WritableByteChannelIOException
public int read(ByteBuffer dst)
throws IOException
read in interface ReadableByteChannelIOExceptionpublic boolean isConnected()
public void close()
throws IOException
close in interface Closeableclose in interface ChannelIOException
public SelectableChannel configureBlocking(boolean b)
throws IOException
IOException
public boolean connect(SocketAddress remote)
throws IOException
IOException
public boolean finishConnect()
throws IOException
IOExceptionpublic Socket socket()
public boolean isInboundDone()
public boolean isOpen()
isOpen in interface Channelpublic boolean isNeedWrite()
isNeedWrite in interface WrappedByteChannel
public void writeMore()
throws IOException
writeMore in interface WrappedByteChannelIOExceptionpublic boolean isNeedRead()
WrappedByteChannel
isNeedRead in interface WrappedByteChannelReadableByteChannel.read(ByteBuffer),
WrappedByteChannel.readMore(ByteBuffer)
public int readMore(ByteBuffer dst)
throws SSLException
WrappedByteChannelReadableByteChannel.read(ByteBuffer).
readMore in interface WrappedByteChannelSSLExceptionpublic boolean isBlocking()
isBlocking in interface WrappedByteChannel
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||