|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.commons.jelly.TagSupport | +--com.werken.blissed.jelly.BlissedTagSupport | +--com.werken.blissed.jelly.RuntimeTagSupport | +--com.werken.blissed.jelly.SpawnTag
Spawn a new process.
This may be used to spawn both top-level and child processes.
In both cases, a new Thread
is created for execution
of the process.
The Thread
for the process may terminate before the
Process
itself, if execution stalls.
Fields inherited from class com.werken.blissed.jelly.RuntimeTagSupport |
PROCESS_CONTEXT_KEY |
Fields inherited from class org.apache.commons.jelly.TagSupport |
body, context, hasTrimmed, parent, shouldTrim |
Constructor Summary | |
SpawnTag()
Construct. |
Method Summary | |
void |
doTag(org.apache.commons.jelly.XMLOutput output)
Evaluates this tag after all the tags properties have been initialized. |
ProcessEngine |
getEngine()
Retrieve the ProcessEngine to use if spawning
a non-nested process. |
Process |
getProcess()
Retrieve the process. |
java.lang.String |
getVar()
Retrieve the variable name in which to store the Activity . |
void |
setAsync(boolean async)
Set the async flag. |
void |
setEngine(ProcessEngine engine)
Set the ProcessEngine to use if spawning
a non-nested process. |
void |
setProcess(Process process)
Set the process to perform. |
void |
setVar(java.lang.String var)
Set the variable name in which to store the Activity . |
Methods inherited from class com.werken.blissed.jelly.RuntimeTagSupport |
getProcessContext |
Methods inherited from class com.werken.blissed.jelly.BlissedTagSupport |
checkObjectAttribute, checkStringAttribute |
Methods inherited from class org.apache.commons.jelly.TagSupport |
findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isTrim, setBody, setContext, setParent, setTrim, trimBody |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SpawnTag()
Method Detail |
public void setProcess(Process process)
process
- The process.public Process getProcess() throws java.lang.Exception
java.lang.Exception
- If a process library cannot be found.public void setEngine(ProcessEngine engine)
ProcessEngine
to use if spawning
a non-nested process.engine
- The process engine.public ProcessEngine getEngine()
ProcessEngine
to use if spawning
a non-nested process.public void setVar(java.lang.String var)
Activity
.var
- The variable name.public java.lang.String getVar()
Activity
.public void setAsync(boolean async)
For top-level, non-nested spawned processes, the async
attribute may be specified in order to signal if the spawned process
should attempt to use the caller's thread or if it should instead
register with the process engine to operate asynchronously.
Even if spawned non-asyncly, once the process blocks, any future work will occur asynchronously within the process engine's thread.
For any process that is spawned as a child of another process,
the async
attribute is invalid and will throw an
exception. All nested processes are spawned asynchronously.
async
- The async flag.public void doTag(org.apache.commons.jelly.XMLOutput output) throws java.lang.Exception
output
- The output sink.java.lang.Exception
- if an error occurs.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |