public class SSLSocketChannel extends Object implements Closeable
| Modifier and Type | Field and Description |
|---|---|
private BufferStateManager |
appDataManager |
private static long |
BUFFER_FULL_EMPTY_WAIT_NANOS |
private SocketChannel |
channel |
private boolean |
closed |
private boolean |
connected |
private SSLEngine |
engine |
private boolean |
handshaking |
private String |
hostname |
private boolean |
interrupted |
private static org.slf4j.Logger |
logger |
static int |
MAX_WRITE_SIZE |
private byte[] |
oneByteBuffer |
private int |
port |
private SocketAddress |
socketAddress |
private BufferStateManager |
streamInManager |
private BufferStateManager |
streamOutManager |
private int |
timeoutMillis |
| Constructor and Description |
|---|
SSLSocketChannel(SSLContext sslContext,
SocketChannel socketChannel,
boolean client) |
SSLSocketChannel(SSLContext sslContext,
String hostname,
int port,
InetAddress localAddress,
boolean client) |
SSLSocketChannel(SSLEngine sslEngine,
SocketChannel socketChannel) |
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
private void |
closeQuietly(Closeable closeable) |
void |
connect() |
void |
consume() |
private int |
copyFromAppDataBuffer(byte[] buffer,
int offset,
int len) |
private SSLEngineResult.Status |
encryptAndWriteFully(BufferStateManager src) |
String |
getDn() |
int |
getTimeout() |
void |
interrupt() |
boolean |
isClosed() |
boolean |
isDataAvailable() |
private void |
performHandshake() |
private void |
performTasks() |
int |
read() |
int |
read(byte[] buffer) |
int |
read(byte[] buffer,
int offset,
int len) |
private int |
readData(ByteBuffer dest) |
void |
setTimeout(int millis) |
void |
write(byte[] data) |
void |
write(byte[] data,
int offset,
int len) |
void |
write(int data) |
private void |
writeFully(ByteBuffer src) |
public static final int MAX_WRITE_SIZE
private static final org.slf4j.Logger logger
private static final long BUFFER_FULL_EMPTY_WAIT_NANOS
private final String hostname
private final int port
private final SSLEngine engine
private final SocketAddress socketAddress
private BufferStateManager streamInManager
private BufferStateManager streamOutManager
private BufferStateManager appDataManager
private SocketChannel channel
private final byte[] oneByteBuffer
private int timeoutMillis
private volatile boolean connected
private boolean handshaking
private boolean closed
private volatile boolean interrupted
public SSLSocketChannel(SSLContext sslContext, String hostname, int port, InetAddress localAddress, boolean client) throws IOException
IOExceptionpublic SSLSocketChannel(SSLContext sslContext, SocketChannel socketChannel, boolean client) throws IOException
IOExceptionpublic SSLSocketChannel(SSLEngine sslEngine, SocketChannel socketChannel) throws IOException
IOExceptionpublic void setTimeout(int millis)
public int getTimeout()
public void connect()
throws IOException
IOExceptionpublic String getDn() throws CertificateException, SSLPeerUnverifiedException
private void performHandshake()
throws IOException
IOExceptionprivate void performTasks()
private void closeQuietly(Closeable closeable)
public void consume()
throws IOException
IOExceptionprivate int readData(ByteBuffer dest) throws IOException
IOExceptionprivate SSLEngineResult.Status encryptAndWriteFully(BufferStateManager src) throws IOException
IOExceptionprivate void writeFully(ByteBuffer src) throws IOException
IOExceptionpublic boolean isClosed()
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionprivate int copyFromAppDataBuffer(byte[] buffer,
int offset,
int len)
public int available()
throws IOException
IOExceptionpublic boolean isDataAvailable()
throws IOException
IOExceptionpublic int read()
throws IOException
IOExceptionpublic int read(byte[] buffer)
throws IOException
IOExceptionpublic int read(byte[] buffer,
int offset,
int len)
throws IOException
IOExceptionpublic void write(int data)
throws IOException
IOExceptionpublic void write(byte[] data)
throws IOException
IOExceptionpublic void write(byte[] data,
int offset,
int len)
throws IOException
IOExceptionpublic void interrupt()
Copyright © 2018 Apache NiFi Project. All rights reserved.