causeClassEvent

causeClassEvent(eventType: Integer;
                immediate: Boolean;
                userInfo:  Any);

The causeClassEvent method of the Class class causes a class event.

Any client waiting for the specified event for the receiver class receives a user notification event.

The parameters for the causeClassEvent method are listed in the following table.

Parameter Description
eventType Any number (integer value) selected by the user, in the range User_Base_Event through User_Max_Event. You can define your own event types in the range User_Base_Event through Max_Integer.
immediate Indicates when the event is actioned. If this value is false, the notification occurs at the end of the transaction. If this value is true, the notification occurs immediately. If the client is not within a begin/commit transaction cycle, the notification waits for the next commit on that client.
userInfo A value of Any primitive type (that is, a string, integer, or character) or object reference that is passed to the causeClassEvent event handler when the event is notified. (Notifications containing binary and string (Binary, String, StringUtf8) data of up to 48K bytes can be sent across the network. For applications running within the server node, the limit for notifications containing binary or string data is 2G bytes. Note, however, that this applies only to single user and server applications. In multiuser applications, persistent notifications are sent via the database server, even if the receiving process is on the same node as the sender. In notification cause events, exception 1267 (Notification info object too big) is raised if the binary or string userInfo data exceeds the applicable value.)
  You should not use a transient object reference across nodes, but you can use a shared transient object reference between applications on the same node.

The following table lists the notification event types.

Global Constant Integer Value
User_Base_Event 16
User_Max_Event Max_Integer (#7FFFFFFF, equates to 2147483647)

The code fragment in the following example shows the use of the causeClassEvent method, where a notification is sent immediately.

Customer.causeClassEvent(Refresh_Customer_Views, true, name);