Class ServerAuthenticationHandler<S extends ServerConnection<S>,T extends com.google.protobuf.Internal.EnumLite>
java.lang.Object
org.apache.drill.exec.rpc.security.ServerAuthenticationHandler<S,T>
- Type Parameters:
S
- Server connection typeT
- RPC type
- All Implemented Interfaces:
RequestHandler<S>
public class ServerAuthenticationHandler<S extends ServerConnection<S>,T extends com.google.protobuf.Internal.EnumLite>
extends Object
implements RequestHandler<S>
Handles SASL exchange, on the server-side.
-
Constructor Summary
ConstructorDescriptionServerAuthenticationHandler
(RequestHandler<S> requestHandler, int saslRequestTypeValue, T saslResponseType) -
Method Summary
Modifier and TypeMethodDescriptionvoid
handle
(S connection, int rpcType, io.netty.buffer.ByteBuf pBody, io.netty.buffer.ByteBuf dBody, ResponseSender sender) Handle request of given type (rpcType) with message (pBody) and optional data (dBody) on the connection, and return the appropriate response.
-
Constructor Details
-
ServerAuthenticationHandler
public ServerAuthenticationHandler(RequestHandler<S> requestHandler, int saslRequestTypeValue, T saslResponseType)
-
-
Method Details
-
handle
public void handle(S connection, int rpcType, io.netty.buffer.ByteBuf pBody, io.netty.buffer.ByteBuf dBody, ResponseSender sender) throws RpcException Description copied from interface:RequestHandler
Handle request of given type (rpcType) with message (pBody) and optional data (dBody) on the connection, and return the appropriate response. The method must do one of three things: + usesend
the response + throw UserRpcException, in which case a response will be sent usingsend
+ throw an Exception, in which case, the connection will be dropped- Specified by:
handle
in interfaceRequestHandler<S extends ServerConnection<S>>
- Parameters:
connection
- remote connectionrpcType
- rpc typepBody
- messagedBody
- data, maybe nullsender
- used tosend
the response- Throws:
RpcException
-