This part of the API Guide describes how to develop custom Java operators for StreamBase applications. A Java operator is a StreamBase component, inserted in the flow of a StreamBase application, that calls a custom Java method.
Java operators extend the following packages in the StreamBase Java API:
com.streambase.sb.operator
com.streambase.sb.operator.parameter
Migration Note
If you are using any pre-3.7 custom operators, their sources must be edited to work with this release of StreamBase, as described in Using the StreamBase Java Operator Wizard.
Designing, developing, and deploying Java operators in StreamBase Studio is similar to working with embedded adapters, and follows this general process:
-
Create the required Java class for your operator. We strongly recommend using the StreamBase Java Operator wizard to generate the base Java code, as described in this topic:
-
Edit the Java source generated by the wizard to implement your specific functionality. The code includes // TODO markers, which indicate sections that need to be completed. The following topic contains detailed information about writing Java operator code:
-
If you are using third-party jars or native libraries, you may need to configure StreamBase Studio to correctly load the libraries:
-
Add the custom operator to a StreamBase application, as described in this Authoring Guide topic:
You can use the operator and test it in the StreamBase Studio environment without compiling or packaging it.
-
Deploy the operator, as described in Deploying Applications. Deployment involves package your operator into a JAR and exporting it to your file system. When you deploy your application, you will need to edit the
sbd.sbconffile that will run it, defining theoperator-resource-searchelement to identify the deployed location of your operator JAR.
