public class SslByteChannel
extends java.lang.Object
implements java.nio.channels.ByteChannel
Modifier and Type | Field and Description |
---|---|
protected java.util.logging.Logger |
logger |
Constructor and Description |
---|
SslByteChannel(java.nio.channels.ByteChannel wrappedChannel,
javax.net.ssl.SSLEngine engine,
java.util.logging.Logger logger)
Creates a new instance of SSLByteChannel
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Ends SSL operation and close the wrapped byte channel
|
void |
close(boolean closeSocket) |
int |
getTimeout() |
boolean |
isOpen()
Is the channel open ?
|
int |
read(java.nio.ByteBuffer clientBuffer)
Fill the given buffer with some bytes and return the number of bytes added in the buffer.
This method may return immediately with nothing added in the buffer. |
int |
readInsideHandshake(java.nio.ByteBuffer clientBuffer) |
void |
setTimeout(int timeoutMillis) |
int |
write(java.nio.ByteBuffer clientBuffer)
Write remaining bytes of the given byte buffer.
|
public SslByteChannel(java.nio.channels.ByteChannel wrappedChannel, javax.net.ssl.SSLEngine engine, java.util.logging.Logger logger)
wrappedChannel
- The byte channel on which this ssl channel is built. This channel contains
encrypted data.engine
- A SSLEngine instance that will remember SSL current context. Warning, such an
instance CAN NOT be sharedlogger
- Logger for logging.public void setTimeout(int timeoutMillis)
public int getTimeout()
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in interface java.nio.channels.Channel
java.io.IOException
- May be raised by close operation on wrapped byte channelpublic void close(boolean closeSocket) throws java.io.IOException
java.io.IOException
public boolean isOpen()
isOpen
in interface java.nio.channels.Channel
public int read(java.nio.ByteBuffer clientBuffer) throws java.io.IOException
read
in interface java.nio.channels.ReadableByteChannel
clientBuffer
- The buffer that will received read bytesjava.io.IOException
- May be raised by ByteChannel read operationpublic int readInsideHandshake(java.nio.ByteBuffer clientBuffer) throws java.io.IOException
java.io.IOException
public int write(java.nio.ByteBuffer clientBuffer) throws java.io.IOException
write
in interface java.nio.channels.WritableByteChannel
clientBuffer
- buffer with remaining bytes to writejava.io.IOException
- May be raised by ByteChannel write operationCopyright © 2024 MarkLogic Corporation
Complete online documentation for MarkLogic Server, XQuery and related components may be found at developer.marklogic.com