public class ControlClient extends BasicClient<BitControl.RpcType,ControlConnection,BitControl.BitControlHandshake,BitControl.BitControlHandshake>
RpcBus.ChannelClosedHandler, RpcBus.InboundHandler| Constructor and Description |
|---|
ControlClient(ControlConnectionConfig config,
CoordinationProtos.DrillbitEndpoint remoteEndpoint,
ReconnectingConnection.CloseHandlerCreator closeHandlerFactory) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
finalizeConnection(BitControl.BitControlHandshake handshake,
ControlConnection connection) |
protected io.netty.util.concurrent.GenericFutureListener<io.netty.channel.ChannelFuture> |
getCloseHandler(io.netty.channel.socket.SocketChannel ch,
ControlConnection clientConnection) |
ProtobufLengthDecoder |
getDecoder(BufferAllocator allocator) |
com.google.protobuf.MessageLite |
getResponseDefaultInstance(int rpcType) |
protected void |
handle(ControlConnection connection,
int rpcType,
io.netty.buffer.ByteBuf pBody,
io.netty.buffer.ByteBuf dBody,
ResponseSender sender) |
protected ControlConnection |
initRemoteConnection(io.netty.channel.socket.SocketChannel channel) |
protected void |
prepareSaslHandshake(RpcConnectionHandler<ControlConnection> connectionHandler,
List<String> serverAuthMechanisms)
Creates various instances needed to start the SASL handshake.
|
protected List<String> |
validateHandshake(BitControl.BitControlHandshake handshake) |
close, connectAsClient, isActive, isAuthComplete, isSslEnabled, send, send, send, setAuthComplete, setAutoRead, setSslChannel, setupSSL, startSaslHandshakepublic ControlClient(ControlConnectionConfig config, CoordinationProtos.DrillbitEndpoint remoteEndpoint, ReconnectingConnection.CloseHandlerCreator closeHandlerFactory)
protected ControlConnection initRemoteConnection(io.netty.channel.socket.SocketChannel channel)
protected io.netty.util.concurrent.GenericFutureListener<io.netty.channel.ChannelFuture> getCloseHandler(io.netty.channel.socket.SocketChannel ch,
ControlConnection clientConnection)
getCloseHandler in class RpcBus<BitControl.RpcType,ControlConnection>public com.google.protobuf.MessageLite getResponseDefaultInstance(int rpcType)
throws RpcException
getResponseDefaultInstance in class RpcBus<BitControl.RpcType,ControlConnection>RpcExceptionprotected void handle(ControlConnection connection, int rpcType, io.netty.buffer.ByteBuf pBody, io.netty.buffer.ByteBuf dBody, ResponseSender sender) throws RpcException
handle in class RpcBus<BitControl.RpcType,ControlConnection>RpcExceptionprotected void prepareSaslHandshake(RpcConnectionHandler<ControlConnection> connectionHandler, List<String> serverAuthMechanisms)
BasicClientBasicClient.validateHandshake(MessageLite) if authentication is required from server side.prepareSaslHandshake in class BasicClient<BitControl.RpcType,ControlConnection,BitControl.BitControlHandshake,BitControl.BitControlHandshake>connectionHandler - - Connection handler used by client's to know about success/failure conditions.serverAuthMechanisms - - List of auth mechanisms configured on server sideprotected List<String> validateHandshake(BitControl.BitControlHandshake handshake) throws RpcException
validateHandshake in class BasicClient<BitControl.RpcType,ControlConnection,BitControl.BitControlHandshake,BitControl.BitControlHandshake>RpcExceptionprotected void finalizeConnection(BitControl.BitControlHandshake handshake, ControlConnection connection)
public ProtobufLengthDecoder getDecoder(BufferAllocator allocator)
getDecoder in class BasicClient<BitControl.RpcType,ControlConnection,BitControl.BitControlHandshake,BitControl.BitControlHandshake>Copyright © 2021 The Apache Software Foundation. All rights reserved.