Business Objects
Quark Platform Documentation
Version 1.7.0_0
Business Objects

org.openquark.cal.runtime
Class ExecutionContext

java.lang.Object
  extended by org.openquark.cal.runtime.ExecutionContext

public abstract class ExecutionContext
extends Object

Provides an environment in which the execution of a CAL function occurs. One of the most important tasks of an execution context is to provide a key to the set of constant applicative form (CAF) values that are in use for the given execution.

In general, a single ExecutionContext object can be used by only 1 thread at a time. It is OK however for a thread to run a program using an execution context, and then when that run is completed for another thread to use the same execution context to run another program. This provides the ability to share CAF values between multiple executions, even if the further executions are on another thread.

Similarly the state of the execution context cannot be altered by one thread (e.g. changing a debugging flag, etc.) while another thread is using the execution context to run a program.

The execution context is also a holder for debugging status flags that are dependent on an execution.

The execution context holds onto an immutable set of properties which is specified by client code on construction of the execution context, and can be accessed from within CAL. Some well-known properties are defined by the platform (e.g. the current locale).

The execution context can also be used to interrupt an executing CAL program without affecting other concurrently executing CAL programs.

Author:
Bo Ilic

Constructor Summary
ExecutionContext()
           
 
Method Summary
abstract  void cleanup()
          Runs the cleanup hooks that have been registered with this instance, in the order in which they were originally registered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecutionContext

public ExecutionContext()
Method Detail

cleanup

public abstract void cleanup()
Runs the cleanup hooks that have been registered with this instance, in the order in which they were originally registered. Calling this method has the effect of clearing the list of cleanup hooks afterwards (so that they don't get run again unless explicitly re-registered). This method does not reset cached CAFs.


Business Objects
Quark Platform Documentation
Version 1.7.0_0
Business Objects

Copyright © 2007 Business Objects. All rights reserved.