|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.jelly.TagSupport
org.apache.commons.jelly.tags.threads.ThreadTag
public class ThreadTag
A tag that spawns the contained script in a separate thread. A thread can wait on another thread or another thread group to finish before starting.
Field Summary | |
---|---|
private boolean |
closeOutput
Should we close the underlying output |
private boolean |
daemon
Set if the thread should be a daemon or not |
private static org.apache.commons.logging.Log |
log
The Log to which logging calls will be made. |
private java.lang.String |
name
Thread Name |
private boolean |
newContext
Should a new context be created |
private int |
priority
Thread priority, defaults to Thread.NORM_PRIORITY |
private JellyThread |
thread
Keep a reference to the thread |
private static int |
threadNumber
The current thread number. |
private java.lang.String |
var
Variable to place the thread into |
private org.apache.commons.jelly.XMLOutput |
xmlOutput
the destination of output |
Fields inherited from class org.apache.commons.jelly.TagSupport |
---|
body, context, hasTrimmed, parent, shouldTrim |
Constructor Summary | |
---|---|
ThreadTag()
|
|
ThreadTag(boolean shouldTrim)
|
Method Summary | |
---|---|
void |
doTag(org.apache.commons.jelly.XMLOutput output)
|
java.lang.Thread |
getThread()
Get the thread instance |
void |
setDaemon(boolean daemon)
Sets the thread to be a daemon thread if true |
void |
setFile(java.lang.String name)
Set the file which is generated from the output |
void |
setName(java.lang.String name)
Sets the name of the thread. |
void |
setNewContext(boolean newContext)
Should a new context be created for this thread? |
void |
setPriority(int priority)
Set the threads priority. |
void |
setVar(java.lang.String var)
Sets the variable name to export, optional |
void |
setXmlOutput(org.apache.commons.jelly.XMLOutput xmlOutput)
Sets the destination of output |
Methods inherited from class org.apache.commons.jelly.TagSupport |
---|
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final org.apache.commons.logging.Log log
private static int threadNumber
private java.lang.String var
private java.lang.String name
private int priority
private boolean daemon
private org.apache.commons.jelly.XMLOutput xmlOutput
private boolean closeOutput
private boolean newContext
private JellyThread thread
Constructor Detail |
---|
public ThreadTag()
public ThreadTag(boolean shouldTrim)
Method Detail |
---|
public void doTag(org.apache.commons.jelly.XMLOutput output) throws org.apache.commons.jelly.JellyTagException
org.apache.commons.jelly.JellyTagException
public void setVar(java.lang.String var)
var
- The variable namepublic void setName(java.lang.String name)
name
- The name to setpublic void setPriority(int priority)
public void setDaemon(boolean daemon)
public void setXmlOutput(org.apache.commons.jelly.XMLOutput xmlOutput)
public void setFile(java.lang.String name) throws java.io.IOException
name
- The output file name
java.io.IOException
public void setNewContext(boolean newContext)
public java.lang.Thread getThread()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |