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,
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, boolean client) throws IOException
IOException
public SSLSocketChannel(SSLContext sslContext, SocketChannel socketChannel, boolean client) throws IOException
IOException
public SSLSocketChannel(SSLEngine sslEngine, SocketChannel socketChannel) throws IOException
IOException
public void setTimeout(int millis)
public int getTimeout()
public void connect() throws SSLHandshakeException, IOException
SSLHandshakeException
IOException
public String getDn() throws CertificateExpiredException, CertificateNotYetValidException, SSLPeerUnverifiedException
private void performHandshake() throws IOException
IOException
private void performTasks()
private void closeQuietly(Closeable closeable)
public void consume() throws IOException
IOException
private int readData(ByteBuffer dest) throws IOException
IOException
private SSLEngineResult.Status encryptAndWriteFully(BufferStateManager src) throws IOException
IOException
private void writeFully(ByteBuffer src) throws IOException
IOException
public boolean isClosed()
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
private int copyFromAppDataBuffer(byte[] buffer, int offset, int len)
public int available() throws IOException
IOException
public boolean isDataAvailable() throws IOException
IOException
public int read() throws IOException
IOException
public int read(byte[] buffer) throws IOException
IOException
public int read(byte[] buffer, int offset, int len) throws IOException
IOException
public void write(int data) throws IOException
IOException
public void write(byte[] data) throws IOException
IOException
public void write(byte[] data, int offset, int len) throws IOException
IOException
public void interrupt()
Copyright © 2016 Apache NiFi Project. All rights reserved.