public interface PipelineRegistrar
Allows a Transformer Module to register methods for availability in pipelines.
Notes:
public class MyPipelineCallbacks {
public void myMethod(int a) {
System.out.println("called from pipeline with < " + a + ">");
}
public void myMethod(int a, int b) {
System.out.println("called from pipeline with < " + a + "> <" + b + ">");
}
}
//initialise method of Transformer module
public void initialise(java.lang.String moduleName, TransformerAccessor transformerAccessor) {
MyPipelineCallbacks callbackObject = new MyPipelineCallbacks();
transformerAccessor.getPipelineRegistrar().registerPipelineMethod(callbackObject, "myMethod");
}
Modifier and Type | Method and Description |
---|---|
void |
registerPipelineMethod(java.lang.Object object,
java.lang.String methodName)
Registers a function with the name pipelineFunctionName with the Pipeline module so that pipelines can
call into Java Transformer modules.
|
void |
registerPipelineMethod(java.lang.Object object,
java.lang.String pipelineFunctionName,
java.lang.String methodName)
Registers a function with the name pipelineFunctionName with the Pipeline module so that pipelines can
call into Java Transformer modules.
|
void registerPipelineMethod(java.lang.Object object, java.lang.String methodName) throws java.lang.NoSuchMethodException
PipelineType
. All methods
passing this validity check will get registered with pipelines. In case of methods being overloaded, the correct
one to call will be determined at runtime, with a few limitations - see Notes.object
- object where the method will get called onmethodName
- method to be called on the provided objectjava.lang.NoSuchMethodException
- if no method with the given name can be foundvoid registerPipelineMethod(java.lang.Object object, java.lang.String pipelineFunctionName, java.lang.String methodName) throws java.lang.NoSuchMethodException
PipelineType
. All methods
passing this validity check will get registered with pipelines. In case of methods being overloaded, the correct
one to call will be determined at runtime, with a few limitations - see Notes.object
- object where the method will get called onpipelineFunctionName
- function name registered with pipelinesmethodName
- method to be called on the provided objectjava.lang.NoSuchMethodException
- if no method with the given name can be foundPlease send bug reports and comments to Caplin support