org.openide.execution
Class ExecutionEngine

java.lang.Object
  |
  +--org.openide.execution.ExecutionEngine

public abstract class ExecutionEngine
extends Object

Engine providing the environment necessary to invoke executors. May perform tasks such as setting up thread groups, etc. Modules should not implement this class, nor need to use it directly.


Constructor Summary
ExecutionEngine()
           
 
Method Summary
protected abstract  NbClassPath createLibraryPath()
          Method that allows implementor of the execution engine to provide class path to all libraries that one could find useful for development in the system.
protected abstract  PermissionCollection createPermissions(CodeSource cs, InputOutput io)
          Trap accesses to Users that want to link their classes with the IDE should do this through internal execution.
abstract  ExecutorTask execute(String name, Runnable run, InputOutput io)
          Prepare the environment for an Executor and start it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecutionEngine

public ExecutionEngine()
Method Detail

execute

public abstract ExecutorTask execute(String name,
                                     Runnable run,
                                     InputOutput io)
Prepare the environment for an Executor and start it. Is typically called from Executor.execute(org.openide.execution.ExecInfo).
Parameters:
name - a name of the new process
run - a runnable to execute
io - an InputOuptut
Returns:
an executor task that can control the execution

createPermissions

protected abstract PermissionCollection createPermissions(CodeSource cs,
                                                          InputOutput io)
Trap accesses to Users that want to link their classes with the IDE should do this through internal execution. The NbClassLoader used in internal execution will assume that calling this method and giving the permission collection to the class being defined will trigger automatic redirection of system output, input, and error streams into the given I/O tab. Implementations of the engine should bind the tab and returned permissions. Since the permission collection is on the stack when calling methods on System#out etc., it is possible to find the appropriate tab for redirection.
Parameters:
cs - code source to construct the permission collection for
io - an I/O tab
Returns:
a permission collection

createLibraryPath

protected abstract NbClassPath createLibraryPath()
Method that allows implementor of the execution engine to provide class path to all libraries that one could find useful for development in the system.
Returns:
class path to libraries


Built on December 12 2001.  |  Portions Copyright 1997-2001 Sun Microsystems, Inc. All rights reserved.