addEventCallback

void session.addEventCallback ( EventFireTime eventTime, EventHandler callback ) (professional and enterprise editions only)
void session.addEventCallbackWithPriority ( EventFireTime eventTime, EventHandler callback, int priority ) (professional and enterprise editions only)

Description

Add a runnable that will be executed at the given time.

Note: session.addEventCallback is automatically executed at a priority of 0.

Parameters

  • eventTime The time to execute a callback.
  • callback The callback to execute.
  • priority The prority for this callback. Lower numbers are higher priority.

Return Values

Returns void.

Change Log

Version Description
6.0.55a Introduced for pro and enterprise editions.

Examples

Sets a handler to do something after the scripts set to run at the end of the session have run.

   // using the default callback with the priority being 0.
   session.addEventCallback(SessionEventFireTime.AfterEndScripts, handler);
   
   // if we need to set the priority to be something else (or variable) use the second option
   // in this case the priority could still be set to 0 if you wanted to.
   session.addEventCallbackWithPriority(SessionEventFireTime.AfterEndScripts, handler, 3);

More Examples