Product Information > JADE Runtime Application Guide > Chapter 1 - Running a JADE User Application > causeEventOnSystem

causeEventOnSystem

The optional causeEventOnSystem parameter enables you to cause an external event on the JADE System object. For example, you can use this feature to shut down JADE systems from a batch process.

With the exception of the path and ini parameters, all other command line arguments are ignored if you specify them in the command line in conjunction with the causeEventOnSystem parameter.

You can optionally define a numeric value (in the range 16 through 2G bytes) that specifies the user event caused on the System object.

If the jadclient program does not detect a user event number specified in the command line, it checks in the [JadeClient] section of the JADE initialization file for an ExternalEventOnSystem parameter. If neither of these parameters is found, the event defaults to the maximum value of 2G bytes.

If you specify a number for the user cause event, the specified event value must match the value specified in the eventType parameter in the Object::beginNotification method. (The Object::causeEvent method is on the System object and it is immediate.)

The signature of the beginNotification method must subscribe to the System object, in the following format.

beginNotification(system, cause-event-number, Response_Continuous, 1);

If you use the causeEventOnSystem parameter to shut down a system, your JADE system must also have a method that executes the terminate instruction when the user notification of the specified event is received.