Package com.rabbitmq.client.impl.nio
Class SslEngineHelper
java.lang.Object
com.rabbitmq.client.impl.nio.SslEngineHelper
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
close
(WritableByteChannel channel, SSLEngine engine) static boolean
doHandshake
(WritableByteChannel writeChannel, ReadableByteChannel readChannel, SSLEngine engine) private static int
retryRead
(ReadableByteChannel channel, ByteBuffer buffer) private static SSLEngineResult.HandshakeStatus
runDelegatedTasks
(SSLEngine sslEngine) private static SSLEngineResult.HandshakeStatus
unwrap
(ByteBuffer cipherIn, ByteBuffer plainIn, ReadableByteChannel channel, SSLEngine sslEngine) private static SSLEngineResult.HandshakeStatus
wrap
(ByteBuffer plainOut, ByteBuffer cipherOut, WritableByteChannel channel, SSLEngine sslEngine) static void
write
(WritableByteChannel socketChannel, SSLEngine engine, ByteBuffer plainOut, ByteBuffer cypherOut)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
-
Constructor Details
-
SslEngineHelper
public SslEngineHelper()
-
-
Method Details
-
doHandshake
public static boolean doHandshake(WritableByteChannel writeChannel, ReadableByteChannel readChannel, SSLEngine engine) throws IOException - Throws:
IOException
-
runDelegatedTasks
-
unwrap
private static SSLEngineResult.HandshakeStatus unwrap(ByteBuffer cipherIn, ByteBuffer plainIn, ReadableByteChannel channel, SSLEngine sslEngine) throws IOException - Throws:
IOException
-
retryRead
- Throws:
IOException
-
wrap
private static SSLEngineResult.HandshakeStatus wrap(ByteBuffer plainOut, ByteBuffer cipherOut, WritableByteChannel channel, SSLEngine sslEngine) throws IOException - Throws:
IOException
-
write
public static void write(WritableByteChannel socketChannel, SSLEngine engine, ByteBuffer plainOut, ByteBuffer cypherOut) throws IOException - Throws:
IOException
-
close
- Throws:
IOException
-