public class TcpNioSSLConnection extends TcpNioConnection
TcpConnection の実装。ソケットを使用する TcpNetConnection とは異なり、JVM は NIO が使用する SocketChannels の SSL を直接サポートしていません。代わりに、SSLEngine が提供されます。これにより、SSL 暗号化は、プレーンテキストバッファーを渡し、暗号化されたバッファーを受信してネットワーク経由で送信することによって実行されます。同様に、ネットワークから読み取られた暗号化されたデータは復号化されます。ただし、これを行う前に、ピアが交換する必要のあるデータバッファの作成を含む、特定のハンドシェイク操作が必要です。そのような転送の数が必要です。ハンドシェイクが終了すると、データの暗号化 / 復号化は比較的簡単になります。
また、ハンドシェイクを再実行する必要があると見なされる場合もあります。
このクラスは、開始ピアと受信ピアの両方から、必要に応じてハンドシェイクの管理をサポートします。
logger| コンストラクターと説明 |
|---|
TcpNioSSLConnection(SocketChannelSE socketChannel, boolean server, boolean lookupHost, ApplicationEventPublisher applicationEventPublisher, StringSE connectionFactoryName, SSLEngineSE sslEngine) |
| 修飾子と型 | メソッドと説明 |
|---|---|
void | close() この接続を閉じます。 |
protected org.springframework.integration.ip.tcp.connection.TcpNioConnection.ChannelOutputStream | getChannelOutputStream() |
protected org.springframework.integration.ip.tcp.connection.TcpNioSSLConnection.SSLChannelOutputStream | getSSLChannelOutputStream() |
SSLSessionSE | getSslSession() |
void | init()SSLEngine を初期化し、暗号化 / 復号化バッファを設定します。 |
protected void | sendToPipe(ByteBufferSE networkBuffer) スーパークラスメソッドをオーバーライドして、復号化を実行したり、ハンドシェイクに参加したりします。 |
void | setHandshakeTimeout(int handshakeTimeout) ハンドシェイクデータの待機中のタイムアウトを設定します(秒単位)。 |
allocate, getDeserializerStateKey, getLastRead, getLastSend, getPayload, getPort, inputStream, isOpen, isUsingDirectBuffers, readPacket, run, send, setLastRead, setPipeTimeout, setTaskExecutor, setUsingDirectBuffers, shutdownInput, shutdownOutputcloseConnection, enableManualListenerRegistration, getConnectionFactoryName, getConnectionId, getDeserializer, getHostAddress, getHostName, getListener, getMapper, getSender, getSenders, getSerializer, getSocketInfo, incrementAndGetConnectionSequence, isNoReadErrorOnClose, isServer, publishConnectionCloseEvent, publishConnectionExceptionEvent, publishConnectionOpenEvent, publishEvent, registerListener, registerSender, registerSenders, registerTestListener, sendExceptionToListener, setDeserializer, setMapper, setNeedsTest, setNoReadErrorOnClose, setSerializer, toStringcloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, waitSE, waitSE, waitSEpublic TcpNioSSLConnection(SocketChannelSE socketChannel, boolean server, boolean lookupHost, @Nullable ApplicationEventPublisher applicationEventPublisher, @Nullable StringSE connectionFactoryName, SSLEngineSE sslEngine)
public void setHandshakeTimeout(int handshakeTimeout)
handshakeTimeout - タイムアウト。public SSLSessionSE getSslSession()
TcpConnection の getSslSession TcpNioConnection の getSslSession SSLSessionSE。そうでない場合は nullprotected void sendToPipe(ByteBufferSE networkBuffer) throws IOExceptionSE
TcpNioConnection の sendToPipe IOExceptionSEpublic void init()
protected org.springframework.integration.ip.tcp.connection.TcpNioConnection.ChannelOutputStream getChannelOutputStream()
TcpNioConnection の getChannelOutputStream protected org.springframework.integration.ip.tcp.connection.TcpNioSSLConnection.SSLChannelOutputStream getSSLChannelOutputStream()
public void close()
TcpConnectionSupportTcpConnection の close TcpNioConnection の close