The main requirement that must be adhered to is that your Executor must ultimately implement an Isight-provided interface com.engineous.sdk.runtime.Component. However, the Isight SDK also provides an abstract class, com.engineous.sdk.runtime.AbstractComponent, that you can merely extend to allow you to implement only the methods you need. In future releases, the Component interface will extend the SystemExtension interface, and it is suggested that all Component implementations extend the SystemExtension to prevent future incompatibilities. If a component class extends the AbstractComponent class, this step is already done by the abstract class and no component code changes are required. The primary method that must be implemented is:
The following methods are also available to implement (all are optional):
The initialize and destroy methods are used primarily for persistent components. A persistent component is one that will not be started and stopped on every execution of the component but instead will be started once and reused for subsequent calls to execute the component, avoiding the overhead of a possibly long start up time and allowing the state of the application to be carried over from one execution to the next. A component is specified as persistent by setting a specific predefined property value (reusePolicy) when defining the component (see Reusable and Persistent Components for more details). The runtimeMessageReceived method is useful for when your component needs to exit any executing code or external program immediately when a job is stopped/cancelled. It is also useful for persistent components to perform some cleanup logic after a job has ended (because destroy will not be called until the Gateway or station is exited as mentioned above). |