net.loadbang.jython.util
Class Invocation

java.lang.Object
  extended by net.loadbang.jython.util.Invocation
All Implemented Interfaces:
java.lang.Runnable

public abstract class Invocation
extends java.lang.Object
implements java.lang.Runnable

Synchronous thread spawning for Jython.

Author:
Nick Rothwell, nick@cassiel.com / nick@loadbang.net

Constructor Summary
Invocation()
           
 
Method Summary
abstract  void invoke()
          Abstract method: make a call into a Jython interpreter in an interlocked thread.
 void protect()
          Invoke a body of code using an interpreter, in a new thread.
 void run()
          Run the body of this invocation in its own thread, then notify the caller.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Invocation

public Invocation()
Method Detail

invoke

public abstract void invoke()
Abstract method: make a call into a Jython interpreter in an interlocked thread.


run

public void run()
Run the body of this invocation in its own thread, then notify the caller.

Specified by:
run in interface java.lang.Runnable
See Also:
Runnable.run()

protect

public void protect()
Invoke a body of code using an interpreter, in a new thread. The call is synchronous: we block until the called code exits.