Class BrokerInterceptorUtils
- java.lang.Object
-
- org.apache.pulsar.broker.intercept.BrokerInterceptorUtils
-
public class BrokerInterceptorUtils extends java.lang.ObjectUtil class to search and loadBrokerInterceptors.
-
-
Constructor Summary
Constructors Constructor Description BrokerInterceptorUtils()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BrokerInterceptorDefinitiongetBrokerInterceptorDefinition(java.lang.String narPath, java.lang.String narExtractionDirectory)Retrieve the broker interceptor definition from the provided handler nar package.BrokerInterceptorDefinitionssearchForInterceptors(java.lang.String interceptorsDirectory, java.lang.String narExtractionDirectory)Search and load the available broker interceptors.
-
-
-
Method Detail
-
getBrokerInterceptorDefinition
public BrokerInterceptorDefinition getBrokerInterceptorDefinition(java.lang.String narPath, java.lang.String narExtractionDirectory) throws java.io.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:
java.io.IOException- when fail to load the broker interceptor or get the definition
-
searchForInterceptors
public BrokerInterceptorDefinitions searchForInterceptors(java.lang.String interceptorsDirectory, java.lang.String narExtractionDirectory) throws java.io.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:
java.io.IOException- when fail to load the available broker interceptors from the provided directory.
-
-