org.apache.commons.jelly.tags.threads
Class ThreadTag
java.lang.Object
|
+--org.apache.commons.jelly.TagSupport
|
+--org.apache.commons.jelly.tags.threads.ThreadTag
- All Implemented Interfaces:
- org.apache.commons.jelly.Tag
- public class ThreadTag
- extends org.apache.commons.jelly.TagSupport
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.
- Author:
- Vinay Chandran, Jason Horman
Fields inherited from class org.apache.commons.jelly.TagSupport |
body, context, hasTrimmed, parent, 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 |
ThreadTag
public ThreadTag()
ThreadTag
public ThreadTag(boolean shouldTrim)
doTag
public void doTag(org.apache.commons.jelly.XMLOutput output)
throws org.apache.commons.jelly.JellyTagException
- Overrides:
doTag
in class org.apache.commons.jelly.TagSupport
setVar
public void setVar(java.lang.String var)
- Sets the variable name to export, optional
- Parameters:
var
- The variable name
setName
public void setName(java.lang.String name)
- Sets the name of the thread.
- Parameters:
name
- The name to set
setPriority
public void setPriority(int priority)
- Set the threads priority. Defaults to Thread.NORM_PRIORITY
setDaemon
public void setDaemon(boolean daemon)
- Sets the thread to be a daemon thread if true
setXmlOutput
public void setXmlOutput(org.apache.commons.jelly.XMLOutput xmlOutput)
- Sets the destination of output
setFile
public void setFile(java.lang.String name)
throws java.io.IOException
- Set the file which is generated from the output
- Parameters:
name
- The output file name
setNewContext
public void setNewContext(boolean newContext)
- Should a new context be created for this thread?
getThread
public java.lang.Thread getThread()
- Get the thread instance
- Returns:
- The thread
Copyright © 2002-2004 Apache Software Foundation. All Rights Reserved.