org.apache.commons.jelly.tags.threads
Class WaitForTag

java.lang.Object
  extended byorg.apache.commons.jelly.TagSupport
      extended byorg.apache.commons.jelly.tags.threads.WaitForTag
All Implemented Interfaces:
org.apache.commons.jelly.Tag

public class WaitForTag
extends org.apache.commons.jelly.TagSupport

This tag creates a dependency on another thread. If onlyWait is set a TimeoutException can be thrown. If status is set a RequirementException can be thrown.

Author:
Jason Horman

Field Summary
 
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
WaitForTag()
           
 
Method Summary
 void doTag(org.apache.commons.jelly.XMLOutput output)
          Check the requirements
 void setGroup(java.util.List group)
          Set the group of threads to wait on
 void setOnlyWait(long onlyWait)
          Set how long to wait for the thread to finish.
 void setStatus(java.lang.String status)
          Wait for a specific status.
 void setThread(JellyThread thread)
          Which thread will this tag check the status of
 
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
 

Constructor Detail

WaitForTag

public WaitForTag()
Method Detail

setStatus

public void setStatus(java.lang.String status)
Wait for a specific status. "SUCCESS", "FAILURE", "TIMED_OUT", or "AVOIDED". If waiting on a thread group each thread in the group will have to have this status set.


setThread

public void setThread(JellyThread thread)
Which thread will this tag check the status of


setGroup

public void setGroup(java.util.List group)
Set the group of threads to wait on


setOnlyWait

public void setOnlyWait(long onlyWait)
Set how long to wait for the thread to finish. If waiting for a group this will be the time to wait for each thread in the group to finish.


doTag

public void doTag(org.apache.commons.jelly.XMLOutput output)
           throws TimeoutException,
                  RequirementException,
                  org.apache.commons.jelly.JellyTagException
Check the requirements

Throws:
TimeoutException - If the call to waitUntilDone(onlyWait) times out
RequirementException - If a threads status doesn't match the setStatus() value
org.apache.commons.jelly.JellyTagException


Copyright © 2002-2006 Apache Software Foundation. All Rights Reserved.