org.apache.commons.jelly.tags.jms
Class ReceiveTag

java.lang.Object
  extended byorg.apache.commons.jelly.TagSupport
      extended byorg.apache.commons.jelly.tags.jms.MessageOperationTag
          extended byorg.apache.commons.jelly.tags.jms.ReceiveTag
All Implemented Interfaces:
ConnectionContext, org.apache.commons.jelly.Tag

public class ReceiveTag
extends MessageOperationTag

Receives a JMS message.

Version:
$Revision: 155420 $
Author:
James Strachan

Field Summary
 
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
ReceiveTag()
           
 
Method Summary
 void doTag(org.apache.commons.jelly.XMLOutput output)
           
 long getTimeout()
           
 java.lang.String getVar()
           
protected  void onMessage(javax.jms.Message message)
          A strategy method which processes the incoming message, allowing derived classes to implement different processing methods
 void setTimeout(long timeout)
          Sets the timeout period in milliseconds to wait for a message.
 void setVar(java.lang.String var)
          Sets the variable name to create for the received message, which will be null if no message could be returned in the given time period.
 
Methods inherited from class org.apache.commons.jelly.tags.jms.MessageOperationTag
findConnection, findDestination, getConnection, getDestination, setConnection, setDestination, setSubject
 
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

ReceiveTag

public ReceiveTag()
Method Detail

doTag

public void doTag(org.apache.commons.jelly.XMLOutput output)
           throws org.apache.commons.jelly.JellyTagException
Throws:
org.apache.commons.jelly.JellyTagException

getVar

public java.lang.String getVar()

setVar

public void setVar(java.lang.String var)
Sets the variable name to create for the received message, which will be null if no message could be returned in the given time period.


getTimeout

public long getTimeout()

setTimeout

public void setTimeout(long timeout)
Sets the timeout period in milliseconds to wait for a message. A value of -1 will wait forever for a message.


onMessage

protected void onMessage(javax.jms.Message message)
A strategy method which processes the incoming message, allowing derived classes to implement different processing methods



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