Class FailingRequestHandler<S extends ServerConnection<S>>

java.lang.Object
org.apache.drill.exec.rpc.FailingRequestHandler<S>
Type Parameters:
S - server connection type
All Implemented Interfaces:
RequestHandler<S>

public class FailingRequestHandler<S extends ServerConnection<S>> extends Object implements RequestHandler<S>
This handler fails any request on the connection. Example use case: the peer is making requests before authenticating.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FailingRequestHandler

      public FailingRequestHandler()
  • 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: + use send the response + throw UserRpcException, in which case a response will be sent using send + throw an Exception, in which case, the connection will be dropped
      Specified by:
      handle in interface RequestHandler<S extends ServerConnection<S>>
      Parameters:
      connection - remote connection
      rpcType - rpc type
      pBody - message
      dBody - data, maybe null
      sender - used to send the response
      Throws:
      RpcException