public class SSLSocketChannel2 extends java.lang.Object implements java.nio.channels.ByteChannel, WrappedByteChannel
| 构造器和说明 |
|---|
SSLSocketChannel2(java.nio.channels.SocketChannel channel,
javax.net.ssl.SSLEngine sslEngine,
java.util.concurrent.ExecutorService exec,
java.nio.channels.SelectionKey key) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
java.nio.channels.SelectableChannel |
configureBlocking(boolean b) |
boolean |
connect(java.net.SocketAddress remote) |
boolean |
finishConnect() |
boolean |
isBlocking()
This function returns the blocking state of the channel
|
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()
returns whether writeMore should be called write additional data.
|
boolean |
isOpen() |
int |
read(java.nio.ByteBuffer dst)
Blocks when in blocking mode until at least one byte has been decoded.
|
int |
readMore(java.nio.ByteBuffer dst)
This function does not read data from the underlying channel at all.
|
java.net.Socket |
socket() |
int |
write(java.nio.ByteBuffer src) |
void |
writeMore()
Gets called when
WrappedByteChannel.isNeedWrite() ()} requires a additional rite |
public SSLSocketChannel2(java.nio.channels.SocketChannel channel,
javax.net.ssl.SSLEngine sslEngine,
java.util.concurrent.ExecutorService exec,
java.nio.channels.SelectionKey key)
throws java.io.IOException
java.io.IOExceptionpublic int write(java.nio.ByteBuffer src)
throws java.io.IOException
write 在接口中 java.nio.channels.WritableByteChanneljava.io.IOExceptionpublic int read(java.nio.ByteBuffer dst)
throws java.io.IOException
read 在接口中 java.nio.channels.ReadableByteChanneljava.io.IOExceptionpublic boolean isConnected()
public void close()
throws java.io.IOException
close 在接口中 java.io.Closeableclose 在接口中 java.lang.AutoCloseableclose 在接口中 java.nio.channels.Channeljava.io.IOExceptionpublic java.nio.channels.SelectableChannel configureBlocking(boolean b)
throws java.io.IOException
java.io.IOExceptionpublic boolean connect(java.net.SocketAddress remote)
throws java.io.IOException
java.io.IOExceptionpublic boolean finishConnect()
throws java.io.IOException
java.io.IOExceptionpublic java.net.Socket socket()
public boolean isInboundDone()
public boolean isOpen()
isOpen 在接口中 java.nio.channels.Channelpublic boolean isNeedWrite()
WrappedByteChannelisNeedWrite 在接口中 WrappedByteChannelpublic void writeMore()
throws java.io.IOException
WrappedByteChannelWrappedByteChannel.isNeedWrite() ()} requires a additional ritewriteMore 在接口中 WrappedByteChanneljava.io.IOException - may be thrown due to an error while writingpublic boolean isNeedRead()
WrappedByteChannelisNeedRead 在接口中 WrappedByteChannelReadableByteChannel.read(ByteBuffer),
WrappedByteChannel.readMore(ByteBuffer)public int readMore(java.nio.ByteBuffer dst)
throws javax.net.ssl.SSLException
WrappedByteChannelReadableByteChannel.read(ByteBuffer).readMore 在接口中 WrappedByteChanneldst - the destiny of the readjavax.net.ssl.SSLExceptionpublic boolean isBlocking()
WrappedByteChannelisBlocking 在接口中 WrappedByteChannel