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

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

public class JoinTag
extends UseThreadTag

A thread join waits until a thread or threadGroup is complete.

Author:
Jason Horman

Field Summary
 
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
JoinTag()
           
 
Method Summary
 void setTimeout(long timeout)
          How long should the join wait.
protected  void useThread(java.lang.Thread thread, org.apache.commons.jelly.XMLOutput output)
          Perform the thread join
protected  void useThreadGroup(java.util.List threadGroup, org.apache.commons.jelly.XMLOutput output)
          Join all of the threads in a thread group
 
Methods inherited from class org.apache.commons.jelly.tags.threads.UseThreadTag
doTag, getThread, getThreadGroup, setSearchForParentThread, setThread, setThreadGroup
 
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

JoinTag

public JoinTag()
Method Detail

useThread

protected void useThread(java.lang.Thread thread,
                         org.apache.commons.jelly.XMLOutput output)
                  throws java.lang.InterruptedException
Perform the thread join

Specified by:
useThread in class UseThreadTag
Throws:
java.lang.InterruptedException

useThreadGroup

protected void useThreadGroup(java.util.List threadGroup,
                              org.apache.commons.jelly.XMLOutput output)
                       throws java.lang.InterruptedException
Join all of the threads in a thread group

Specified by:
useThreadGroup in class UseThreadTag
Throws:
java.lang.InterruptedException

setTimeout

public void setTimeout(long timeout)
How long should the join wait. If <= 0 the join waits until the thread is dead.

Parameters:
timeout - in millis


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