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 Summary

    Modifier and Type
    Method
    Description
    default void
    postEndpointInvocation(ObserverContext<? extends RegionCoprocessorEnvironment> ctx, org.apache.hbase.thirdparty.com.google.protobuf.Service service, String methodName, org.apache.hbase.thirdparty.com.google.protobuf.Message request, org.apache.hbase.thirdparty.com.google.protobuf.Message.Builder responseBuilder)
    Called after an Endpoint service method is invoked.
    default org.apache.hbase.thirdparty.com.google.protobuf.Message
    preEndpointInvocation(ObserverContext<? extends RegionCoprocessorEnvironment> ctx, org.apache.hbase.thirdparty.com.google.protobuf.Service service, String methodName, org.apache.hbase.thirdparty.com.google.protobuf.Message request)
    Called before an Endpoint service method is invoked.
  • Method Details

    • preEndpointInvocation

      default org.apache.hbase.thirdparty.com.google.protobuf.Message preEndpointInvocation(ObserverContext<? extends RegionCoprocessorEnvironment> ctx, org.apache.hbase.thirdparty.com.google.protobuf.Service service, String methodName, org.apache.hbase.thirdparty.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<? extends RegionCoprocessorEnvironment> ctx, org.apache.hbase.thirdparty.com.google.protobuf.Service service, String methodName, org.apache.hbase.thirdparty.com.google.protobuf.Message request, org.apache.hbase.thirdparty.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