N - the type of NetworkContext@Deprecated public final class SslDelegatingTcpHandler<N extends SslNetworkContext<N>> extends Object implements TcpHandler<N>, NetworkContextManager<N>
TcpHandler, providing symmetric encryption/decryption transparently to the underlying handler.
When process is called by the TcpEventHandler, this class will first attempt to perform an SSL handshake with the remote
connection. This is a blocking operation, and the process call will not return until the handshake is successful, or fails.
Further operation is delegated to the SslEngineStateMachine class, which manages the conversion of data between plain-text and cipher-text
either end of the network connection.
It is advised to force TLS version 1.2 to be used with this handler, such as by setting system
property jdk.tls.server.protocols to TLSv1.2.
| Constructor and Description |
|---|
SslDelegatingTcpHandler(TcpHandler<N> delegate)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Deprecated.
|
boolean |
hasClientClosed()
Deprecated.
|
boolean |
isClosed()
Deprecated.
|
N |
nc()
Deprecated.
|
void |
nc(N nc)
Deprecated.
|
void |
onEndOfConnection(boolean heartbeatTimeOut)
Deprecated.
|
void |
onReadTime(long readTimeNS,
ByteBuffer inBB,
int position,
int limit)
Deprecated.
|
void |
onWriteTime(long writeTimeNS,
ByteBuffer byteBuffer,
int position,
int limit)
Deprecated.
|
void |
process(@NotNull net.openhft.chronicle.bytes.Bytes<?> in,
@NotNull net.openhft.chronicle.bytes.Bytes<?> out,
N nc)
Deprecated.
The server reads the bytes
in from the client and sends a response out back
to the client. |
void |
sendHeartBeat(net.openhft.chronicle.bytes.Bytes<?> out,
SessionDetailsProvider sessionDetails)
Deprecated.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithasTimedOut, performIdleWorkpublic SslDelegatingTcpHandler(TcpHandler<N> delegate)
public void process(@NotNull
@NotNull net.openhft.chronicle.bytes.Bytes<?> in,
@NotNull
@NotNull net.openhft.chronicle.bytes.Bytes<?> out,
N nc)
in from the client and sends a response out back
to the client.process in interface TcpHandler<N extends SslNetworkContext<N>>in - the bytes send from the clientout - the response send back to the clientpublic void sendHeartBeat(net.openhft.chronicle.bytes.Bytes<?> out,
SessionDetailsProvider sessionDetails)
sendHeartBeat in interface TcpHandler<N extends SslNetworkContext<N>>public void onEndOfConnection(boolean heartbeatTimeOut)
onEndOfConnection in interface TcpHandler<N extends SslNetworkContext<N>>public void close()
close in interface Closeableclose in interface AutoCloseablepublic void onReadTime(long readTimeNS,
ByteBuffer inBB,
int position,
int limit)
onReadTime in interface TcpHandler<N extends SslNetworkContext<N>>public void onWriteTime(long writeTimeNS,
ByteBuffer byteBuffer,
int position,
int limit)
onWriteTime in interface TcpHandler<N extends SslNetworkContext<N>>public boolean hasClientClosed()
hasClientClosed in interface ClientClosedProvidertrue if the client has intentionally closedpublic boolean isClosed()
isClosed in interface net.openhft.chronicle.core.io.QueryCloseablepublic N nc()
nc in interface NetworkContextManager<N extends SslNetworkContext<N>>public void nc(N nc)
nc in interface NetworkContextManager<N extends SslNetworkContext<N>>Copyright © 2023. All rights reserved.