Class WorkerServiceLoader
- java.lang.Object
-
- org.apache.pulsar.functions.worker.service.WorkerServiceLoader
-
public class WorkerServiceLoader extends java.lang.ObjectLoader to load worker service.
-
-
Constructor Summary
Constructors Constructor Description WorkerServiceLoader()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static WorkerServiceDefinitiongetWorkerServiceDefinition(java.lang.String narPath, java.lang.String narExtractionDirectory)Retrieve the functions worker service definition from the provided worker service nar package.static WorkerServiceload(org.apache.pulsar.functions.worker.WorkerConfig workerConfig)Load the worker services for the given protocol list.
-
-
-
Method Detail
-
getWorkerServiceDefinition
public static WorkerServiceDefinition getWorkerServiceDefinition(java.lang.String narPath, java.lang.String narExtractionDirectory) throws java.io.IOException
Retrieve the functions worker service definition from the provided worker service nar package.- Parameters:
narPath- the path to the worker service NAR package- Returns:
- the worker service definition
- Throws:
java.io.IOException- when fail to load the worker service or get the definition
-
load
public static WorkerService load(org.apache.pulsar.functions.worker.WorkerConfig workerConfig)
Load the worker services for the given protocol list.- Parameters:
workerConfig- the functions worker config- Returns:
- the worker service
-
-