org.apache.ignite.internal.util.nio.ssl

## Class BlockingSslHandler

- java.lang.Object
- - org.apache.ignite.internal.util.nio.ssl.BlockingSslHandler

    public class BlockingSslHandler
    extends Object

### Constructor Summary

Constructors
Constructor and Description
`BlockingSslHandler(SSLEngine sslEngine, SocketChannel ch, boolean directBuf, ByteOrder order, IgniteLogger log)`

### Method Summary

All Methods Instance Methods Concrete Methods
`ByteBuffer` `applicationBuffer()`
`ByteBuffer` `decode(ByteBuffer buf)` Called by SSL filter when new message was received.
`ByteBuffer` `encrypt(ByteBuffer src)` Encrypts data to be written to the network.
`boolean` `handshake()` Performs handshake procedure with remote peer.
`ByteBuffer` `inputBuffer()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### BlockingSslHandler

    public BlockingSslHandler(SSLEngine sslEngine,
                              SocketChannel ch,
                              boolean directBuf,
                              ByteOrder order,
                              IgniteLogger log)
                       throws SSLException

Parameters:
  `sslEngine` - SSLEngine.
  `ch` - Socket channel.
  `directBuf` - Direct buffer flag.
  `order` - Byte order.
  `log` - Logger.
Throws:
  `SSLException`

### Method Detail

#### inputBuffer

    public ByteBuffer inputBuffer()

#### handshake

    public boolean handshake()
                      throws IgniteCheckedException,
                             SSLException

Performs handshake procedure with remote peer.

Throws:
  `GridNioException` - If filter processing has thrown an exception.
  `SSLException` - If failed to process SSL data.
  `IgniteCheckedException`

#### applicationBuffer

    public ByteBuffer applicationBuffer()

Returns:
  Application buffer with decoded data.

#### encrypt

    public ByteBuffer encrypt(ByteBuffer src)
                       throws SSLException

Encrypts data to be written to the network.

Parameters:
  `src` - data to encrypt.
Returns:
  Output buffer with encrypted data.
Throws:
  `SSLException` - on errors.

#### decode

    public ByteBuffer decode(ByteBuffer buf)
                      throws IgniteCheckedException,
                             SSLException

Called by SSL filter when new message was received.

Parameters:
  `buf` - Received message.
Throws:
  `GridNioException` - If exception occurred while forwarding events to underlying filter.
  `SSLException` - If failed to process SSL data.
  `IgniteCheckedException`

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.7.0
Release Date | : November 30 2018