in jelly-tags/threads/src/main/java/org/apache/commons/jelly/tags/threads/WaitForTag.java [75:102]
public void doTag(XMLOutput output) throws TimeoutException, RequirementException, JellyTagException {
if (thread == null && group == null) {
throw new JellyTagException("This tag requires that you set the thread or group attribute");
}
// wait on the thread
if (thread != null) {
thread.waitUntilDone(onlyWait);
if (status != RunnableStatus.NONE) {
if (!thread.getStatus().equals(status)) {
throw new RequirementException("Requirement on thread \"" + thread.getName() + "\" not met");
}
}
}
// wait on the threadgroup
if (group != null) {
for (int i = 0; i < group.size(); i++) {
JellyThread gthread = (JellyThread) group.get(i);
gthread.waitUntilDone(onlyWait);
if (status != RunnableStatus.NONE) {
if (!gthread.getStatus().equals(status)) {
throw new RequirementException("Requirement on thread \"" + gthread.getName() + "\" not met");
}
}
}
}
}