Script functions reference > Java functions

Java functions
StreamServe Java script functions can be used to invoke custom external Java code. There is support for calling statically defined Java methods directly without instantiating any objects. There is also support for creating and destroying objects of specific class type and invoking object methods. The lifetime of these objects is currently limited to local scope, i.e. they will automatically be destroyed after each script event. It is therefore not necessary to destroy objects explicitly, memory will be released automatically.
It is currently only possible to transfer arguments of String type to Java code.
It is important to handle thread synchronization correctly in the Java code. This is only needed when invoking static Java methods (using JavaInvokeStaticMethod). Multiple StreamServe threads can be running concurrently, this can result in Java invocations from more than one thread.
For performance reasons, be careful when performing resource consuming (time and memory) operations such as opening database connections, logging in to external systems, etc. If possible, perform such operations only once instead of performing them frequently (opening and closing connections, etc).
There is currently support for accessing the StreamServe log and accessing meta data from the Java code. A script context is used in the Java code to query for specific interfaces such as log interface and meta data interface. The procedure for this is the same as for the Java Notifications functionality, see the Notifications SDK documentation for more information.
Java functions
The table below contains a short description of each script function. For information about syntax, examples, etc., see the full description of each script function.
Invokes the Java method strMethodName of the Java object identified by strObjHandle.
 
OpenText StreamServe 5.6 Updated: 2013-03-01