The core Ibex engine classes.

Interfacing with other code

This engine is not meant to be used as a library or to interface with any other code. Because of this, all classes and methods have package (nonpublic) access, except where interpackage calls or reflection demand that they be public. Authors of other software should NEVER depend on any of these APIs.

An important note about Threads

All operations are single-threaded, except sleep(), yield(), xmlrpc calls, and MessageQueue message loop. That means that while one thread is rendering or executing a script, no other thread can be rendering or executing a script.

For performance reasons, we do not enforce this single-threadedness with Java synchronization primitives. If you change the engine code, be very careful not to violate this invariant. In general, you should only render or execute JavaScripts if (Thread.currentThread() == MessageQueue.singleton). The only exception is instances of ThreadMessage -- they include logic to block the MessageQueue thread on a semaphore, execute some javascript, and unblock the MessageQueue thread once the javascript has returned or performed some blocking operation. Be especially careful not to manipulate instances of Box from within the AWT thread. @see MessageQueue ThreadMessage