|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.openide.ServiceType | +--org.openide.execution.Executor
Implements the execution of a class.
There may be several different types of executors installed in the system,
some of which may only be appropriate for certain types of objects
(e.g., applets or servlets).
The two standard ones, both assuming a main method (i.e. a standalone Java program),
are ThreadExecutor
(internal execution)
and ProcessExecutor
(external execution).
This class currently has a property editor in the default IDE property editor search path.
Inner classes inherited from class org.openide.ServiceType |
ServiceType.Handle, ServiceType.Registry |
Fields inherited from class org.openide.ServiceType |
PROP_NAME |
Constructor Summary | |
Executor()
|
Method Summary | |
ExecutorTask |
execute(DataObject obj)
Executes a dataobject. |
abstract ExecutorTask |
execute(ExecInfo info)
Execute a class given by name with some arguments in this executor. |
static Enumeration |
executors()
Get all registered executors in the system's execution engine. |
static Executor |
find(Class clazz)
Find the executor implemented as a given class, among the executors registered to the execution engine. |
static Executor |
find(String name)
Find the executor with requested name, among the executors registered to the execution engine. |
static Executor |
getDefault()
Deprecated. The notion of a default executor for all file types is probably meaningless. |
HelpCtx |
getHelpCtx()
Get context help for this service type. |
boolean |
needsIO()
Instruct the execution engine whether the process might need I/O communication with the user. |
Methods inherited from class org.openide.ServiceType |
addPropertyChangeListener, clone, createClone, displayName, firePropertyChange, getName, removePropertyChangeListener, setName |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Executor()
Method Detail |
public abstract ExecutorTask execute(ExecInfo info) throws IOException
info
- information describing what to executeIOException
- if the execution cannot be started (class is missing, etc.)public ExecutorTask execute(DataObject obj) throws IOException
obj
- object to executeIOException
- if the execution cannot be started (class is missing, etc.)public boolean needsIO()
The default implementation returns true
.
true
if the process needs I/Opublic HelpCtx getHelpCtx()
ServiceType
getHelpCtx
in class ServiceType
org.openide.ServiceType
public static Enumeration executors()
Executor
spublic static Executor find(Class clazz)
This should be used during (de-)serialization of the specific executor for a data object: only store its class name and then try to find the executor implemented by that class later.
clazz
- the class of the executor looked fornull
if it does not existpublic static Executor find(String name)
This should be used during (de-)serialization of the specific executor for a data object: only store its name and then try to find the executor later.
name
- (display) name of executor to findnull
if it does not existpublic static Executor getDefault()
You may actually want ExecSupport.getExecutor(org.openide.loaders.MultiDataObject.Entry)
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |