Tag Documentation

[tag libraries] [tags]

The following document contains a summary of all theJellytag libraries.

Tag Libraries

[tag libraries] [tags]

LibraryDescription
jelly:threads

A library for processing Jelly scripts using multiple threads.

jelly:threads

A library for processing Jelly scripts using multiple threads.

Tag NameDescription
groupRepresents a group of threads. This is not the same as Java's thread groups.All of the threads in a thread group are started at the same time, not as theyare defined. Use this in conjunction with other tags like join to manipulatea group of threads.
interruptInterrupts a thread or thread group.
joinA thread join waits until a thread or threadGroup is complete.
mutexCreates a mutex object and stores it in a variable
notifyThis calls mutex.notify() or mutex.notifyAll() on the mutex passedin via the "mutex" attribute.
sleepPuts the current thread to sleep for some amount of time.
synchronizeSynchronize a block inside of a thread using the passed in mutex. Themutex object passed in does not have to have been created using themutex tag, it can be any object at all.
threadA tag that spawns the contained script in a separate thread. A threadcan wait on another thread or another thread group to finish before starting.
waitThis calls mutex.wait() on the mutex passed in via the "mutex" attribute.
waitForThis tag creates a dependency on another thread. If onlyWait is seta org.apache.commons.jelly.tags.threads.TimeoutExceptioncan be thrown. If status is set a org.apache.commons.jelly.tags.threads.RequirementExceptioncan be thrown.

Tags

[tag libraries] [tags]

threads:group

Represents a group of threads. This is not the same as Java's thread groups.All of the threads in a thread group are started at the same time, not as theyare defined. Use this in conjunction with other tags like join to manipulatea group of threads.

Attribute NameTypeDescription
escapeTextboolean
trimboolean
varjava.lang.StringSet the variable name to store the thread group in

threads:interrupt

Interrupts a thread or thread group.

Attribute NameTypeDescription
escapeTextboolean
searchForParentThreadbooleanIf true the tag will search for a parent thread tag to "use" ifno thread was set via setThread . This is true by default.
threadjava.lang.ThreadSet the thread to use in some way.
threadGroupjava.util.ListSet the thread group to "use".
trimboolean

threads:join

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

Attribute NameTypeDescription
escapeTextboolean
searchForParentThreadbooleanIf true the tag will search for a parent thread tag to "use" ifno thread was set via setThread . This is true by default.
threadjava.lang.ThreadSet the thread to use in some way.
threadGroupjava.util.ListSet the thread group to "use".
timeoutlongHow long should the join wait. If <= 0 the join waits until thethread is dead.
trimboolean

threads:mutex

Creates a mutex object and stores it in a variable

Attribute NameTypeDescription
escapeTextboolean
trimboolean
varjava.lang.StringSets the variable name to export

threads:notify

This calls mutex.notify() or mutex.notifyAll() on the mutex passedin via the "mutex" attribute.

Attribute NameTypeDescription
escapeTextboolean
mutexjava.lang.ObjectSet the mutex. Any object can be used as a mutex.
notifyAllbooleanIf set to true the notify will notify all waiting threads
trimboolean

threads:sleep

Puts the current thread to sleep for some amount of time.

Attribute NameTypeDescription
escapeTextboolean
forlongHow long to put the thread to sleep for
trimboolean

threads:synchronize

Synchronize a block inside of a thread using the passed in mutex. Themutex object passed in does not have to have been created using themutex tag, it can be any object at all.

Attribute NameTypeDescription
escapeTextboolean
mutexjava.lang.ObjectSet the mutex. Any object can be used as a mutex.
trimboolean

threads:thread

A tag that spawns the contained script in a separate thread. A threadcan wait on another thread or another thread group to finish before starting.

Attribute NameTypeDescription
daemonbooleanSets the thread to be a daemon thread if true
escapeTextboolean
filejava.lang.StringSet the file which is generated from the output
namejava.lang.StringSets the name of the thread.
newContextbooleanShould a new context be created for this thread?
priorityintSet the threads priority. Defaults to Thread.NORM_PRIORITY
trimboolean
varjava.lang.StringSets the variable name to export, optional
xmlOutputorg.apache.commons.jelly.XMLOutputSets the destination of output

threads:wait

This calls mutex.wait() on the mutex passed in via the "mutex" attribute.

Attribute NameTypeDescription
escapeTextboolean
mutexjava.lang.ObjectSet the mutex. Any object can be used as a mutex.
timeoutlongSet how long the wait should last. If <= 0 the wait will lastuntil a notify occurs.
trimboolean

threads:waitFor

This tag creates a dependency on another thread. If onlyWait is seta org.apache.commons.jelly.tags.threads.TimeoutExceptioncan be thrown. If status is set a org.apache.commons.jelly.tags.threads.RequirementExceptioncan be thrown.

Attribute NameTypeDescription
escapeTextboolean
groupjava.util.ListSet the group of threads to wait on
onlyWaitlongSet how long to wait for the thread to finish. If waiting for a groupthis will be the time to wait for each thread in the group to finish.
statusjava.lang.StringWait for a specific status. "SUCCESS", "FAILURE", "TIMED_OUT", or "AVOIDED". Ifwaiting on a thread group each thread in the group will have to have this statusset.
threadorg.apache.commons.jelly.tags.threads.JellyThreadWhich thread will this tag check the status of
trimboolean