JoltUserEventNew Function

Action

Creates a new JoltUserEvent object. A JoltUserEvent object represents a subscription to an asynchronous notification event. An asynchronous notification is either an unsolicited event notification or event notification from the TUXEDO Event Broker. In Silk Performer, the Jolt default event handler is used for all events.

Include file

Jolt.bdh

Syntax

JoltUserEventNew( in sExpression : string,
                  in sFilter     : string allownull,
                  in hSession    : number ): number;

Return value

Handle to the new JoltUserEvent object.

Parameter Description
sExpression Regular expression for event notification. This parameter is a string containing a regular expression of the same format as the event expression used in Tux_tpsubscribe. To subscribe unsolicited messages, use the constant ULSOLMSG.
sFilter String of the same format as the filter parameter passed to Tux_tpsubscribe. Filter rules are specific to the buffers to which they are applied
hSession Handle to a JoltSession object that was created with JoltSessionNew

Example

var
  hSession, hSessionAttr, hUserEvent: number;
 dcltrans
  transaction TInit
  begin
    JavaSetOption(JAVA_VERSION, JAVA_V11);
    JavaSetOption(JAVA_HOME, "c:/jdk1.1.7");
    JavaSetOption(JAVA_CLASSPATH, "c:/jdk1.1.7");
    JoltInit();     hSessionAttr := JoltSessionAttributesNew();
    JoltSetString(hSessionAttr, APPADDRESS, "//lab:8000");
    hSession := JoltSessionNew(hSessionAttr, "", "ATM", "", "");
    hUserEvent := JoltUserEventNew(UNSOLMSG, NULL, hSession);
  end TInit; 
  transaction TShutdown
  begin
    JoltUnsubscribe(hUserEvent);
    JoltEndSession(hSession);
    JoltFreeObject(hUserEvent);
    JoltFreeObject(hSession);
    JoltFreeObject(hSessionAttr);
  end TShutdown;

See also

Java: bea.jolt.JoltUserEvent class