Jolt 1.2 Developer's Guide

public static void main( Strings args[] )
{
JoltUserEvent unsolEvent;
JoltUserEvent helloEvent;
EventSession session;
...
// Instantiate my session object which can print out the
// unsolicited messages. Then subscribe to HELLO event
// and Unsolicited Notification which both use STRING
// buffer type for the unsolicited messages.
session = new EventSession(...);
helloEvent = new JoltUserEvent("HELLO", null, session);
unsolEvent = new JoltUserEvent(JoltUserEvent.UNSOLMSG, null,
session);
...
// Unsubscribe the HELLO event and unsolicited notification.
helloEvent.unsubscribe();
unsolEvent.unsubscribe();
}
}
Clearing Parameter Values
The Jolt Class Library includes a method (the clear method) that allows the developer to remove an object's existing attributes and in effect provides
for the reuse of the object. The reuseSample.java example illustrates how to use the clear method for clearing parameter values.
The reuseSample.java example shows how to reuse the JoltRemoteService parameter values. The example shows that you do not have to destroy the
service to reuse it. Instead, the svc.clear(); statement is used to discard the existing input parameters before reusing the addString method.