Class BrokerInterceptorUtils

java.lang.Object
org.apache.pulsar.broker.intercept.BrokerInterceptorUtils

public class BrokerInterceptorUtils extends Object
Util class to search and load BrokerInterceptors.
  • Constructor Details

    • BrokerInterceptorUtils

      public BrokerInterceptorUtils()
  • Method Details

    • getBrokerInterceptorDefinition

      public BrokerInterceptorDefinition getBrokerInterceptorDefinition(String narPath, String narExtractionDirectory) throws IOException
      Retrieve the broker interceptor definition from the provided handler nar package.
      Parameters:
      narPath - the path to the broker interceptor NAR package
      Returns:
      the broker interceptor definition
      Throws:
      IOException - when fail to load the broker interceptor or get the definition
    • searchForInterceptors

      public BrokerInterceptorDefinitions searchForInterceptors(String interceptorsDirectory, String narExtractionDirectory) throws IOException
      Search and load the available broker interceptors.
      Parameters:
      interceptorsDirectory - the directory where all the broker interceptors are stored
      Returns:
      a collection of broker interceptors
      Throws:
      IOException - when fail to load the available broker interceptors from the provided directory.