Interface EndpointObserver

All Known Implementing Classes:
AccessController

@LimitedPrivate("Coprocesssor") @Evolving public interface EndpointObserver
Coprocessors implement this interface to observe and mediate endpoint invocations on a region.

Exception Handling

For all functions, exception handling is done as follows:
  • Method Details

    • preEndpointInvocation

      default com.google.protobuf.Message preEndpointInvocation(ObserverContext<RegionCoprocessorEnvironment> ctx, com.google.protobuf.Service service, String methodName, com.google.protobuf.Message request) throws IOException
      Called before an Endpoint service method is invoked. The request message can be altered by returning a new instance. Throwing an exception will abort the invocation. Calling ObserverContext.bypass() has no effect in this hook.
      Parameters:
      ctx - the environment provided by the region server
      service - the endpoint service
      request - Request message expected by given Service's method (by the name methodName).
      methodName - the invoked service method
      Returns:
      the possibly modified message
      Throws:
      IOException
    • postEndpointInvocation

      default void postEndpointInvocation(ObserverContext<RegionCoprocessorEnvironment> ctx, com.google.protobuf.Service service, String methodName, com.google.protobuf.Message request, com.google.protobuf.Message.Builder responseBuilder) throws IOException
      Called after an Endpoint service method is invoked. The response message can be altered using the builder.
      Parameters:
      ctx - the environment provided by the region server
      service - the endpoint service
      methodName - the invoked service method
      request - Request message expected by given Service's method (by the name methodName).
      responseBuilder - Builder for final response to the client, with original response from Service's method merged into it.
      Throws:
      IOException