public class OutboundConnectionInitiator<SuccessType extends OutboundConnectionInitiator.Result.Success>
extends java.lang.Object
ChannelHandler
to execute the send-side of the internode handshake protocol.
As soon as the handler is added to the channel via ChannelInboundHandler.channelActive(ChannelHandlerContext)
(which is only invoked if the underlying TCP connection was properly established), the HandshakeProtocol.Initiate
handshake is sent. See HandshakeProtocol
for full details.
Upon completion of the handshake (on success or fail), the resultPromise
is completed.
See OutboundConnectionInitiator.Result
for details about the different result states.
This class extends ByteToMessageDecoder
, which is a ChannelInboundHandler
, because this handler
waits for the peer's handshake response (the HandshakeProtocol.Accept
of the internode messaging handshake protocol).
Modifier and Type | Class and Description |
---|---|
static class |
OutboundConnectionInitiator.Result<SuccessType extends OutboundConnectionInitiator.Result.Success>
The result of the handshake.
|
Modifier and Type | Method and Description |
---|---|
static io.netty.util.concurrent.Future<OutboundConnectionInitiator.Result<OutboundConnectionInitiator.Result.StreamingSuccess>> |
initiateStreaming(io.netty.channel.EventLoop eventLoop,
OutboundConnectionSettings settings,
int requestMessagingVersion)
Initiate a connection with the requested messaging version.
|
public static io.netty.util.concurrent.Future<OutboundConnectionInitiator.Result<OutboundConnectionInitiator.Result.StreamingSuccess>> initiateStreaming(io.netty.channel.EventLoop eventLoop, OutboundConnectionSettings settings, int requestMessagingVersion)
Future
is guaranteed to be completed on the supplied eventLoop.Copyright © 2009- The Apache Software Foundation