|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sunlabs.brazil.template.Template | +--sunlabs.brazil.template.QueueTemplate
Template class for Managing simple Queues, allowing text communication among sessions. The "name" attribute names the Q. When enqueueing messages, "name" is a white space separated list of queue recipients. When Dequeueing Messages, "name" is the recipient Queue.
The following tags are recognized.
<enqueue name="recipients ..." meta="anything" message="msg"
from="sender" [nocreate="true|false"] >
<dequeue name="name" prepend="props prefix"
timelimit="sec">
<queueinfo name="q_name" prepend="props prefix" clear>
Nested Class Summary | |
static class |
QueueTemplate.Queue
Create an object queue. |
static class |
QueueTemplate.QueueItem
A bag of items to keep on the Q. |
Field Summary | |
static String |
Q_ID
|
Fields inherited from class sunlabs.brazil.template.Template |
debug |
Constructor Summary | |
QueueTemplate()
|
Method Summary | |
static QueueTemplate.QueueItem |
dequeue(String name,
int timelimit)
Program access to the Q. |
static boolean |
enqueue(String to,
String from,
String message,
String meta,
boolean noCreate,
boolean force)
Allow another data to be enqueued from java code. |
static QueueTemplate.Queue |
getQ(String name)
Return a Q |
void |
tag_dequeue(RewriteContext hr)
Remove an item from the queue, and generate the appropriate properties. |
void |
tag_enqueue(RewriteContext hr)
Add a text message onto a named queue. |
void |
tag_queueinfo(RewriteContext hr)
Return info about the Q, and optionally clear it. |
Methods inherited from class sunlabs.brazil.template.Template |
done, init |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String Q_ID
Constructor Detail |
public QueueTemplate()
Method Detail |
public void tag_enqueue(RewriteContext hr)
The property "count" contains the number of recipients for which the message was successfully Queued. The property "error.name" will contain an error message if Queueing failed. In both cases, the template prefix will be prepended. It is not considered an error condition for a message not to be delivered to a non existent Queue if "nocreate" is set.
public static boolean enqueue(String to, String from, String message, String meta, boolean noCreate, boolean force)
public void tag_dequeue(RewriteContext hr)
public static QueueTemplate.QueueItem dequeue(String name, int timelimit)
public void tag_queueinfo(RewriteContext hr)
public static QueueTemplate.Queue getQ(String name)
|
Version 2.1, Generated 12/30/04 Copyright (c) 2001-2004, Sun Microsystems. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |