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

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

public class SubscribeTag
extends MessageOperationTag
implements ConsumerTag

Performs a subscription to some JMS connection to a destination maybe with a selector. A JMS MessageListener can be specified, or a special child tag can explicitly set it on its parent (so a special tag could construct a MessageListener object and register it with this tag).

Version:
$Revision: 155420 $
Author:
James Strachan

Field Summary
private static org.apache.commons.logging.Log log
          The Log to which logging calls will be made.
private  javax.jms.MessageListener messageListener
          The JMS MessageListener used to create the subscription
private  java.lang.String selector
          the JMS Selector for the subscription
 
Fields inherited from class org.apache.commons.jelly.tags.jms.MessageOperationTag
 
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
SubscribeTag()
           
 
Method Summary
 void doTag(org.apache.commons.jelly.XMLOutput output)
           
 javax.jms.MessageListener getMessageListener()
          Returns the messageListener.
 void setMessageListener(javax.jms.MessageListener messageListener)
          Sets the JMS messageListener used ot consume JMS messages on the given destination
 void setSelector(java.lang.String selector)
          Sets the optional JMS Message selector for the subscription
 
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
 

Field Detail

log

private static final org.apache.commons.logging.Log log
The Log to which logging calls will be made.


selector

private java.lang.String selector
the JMS Selector for the subscription


messageListener

private javax.jms.MessageListener messageListener
The JMS MessageListener used to create the subscription

Constructor Detail

SubscribeTag

public SubscribeTag()
Method Detail

doTag

public void doTag(org.apache.commons.jelly.XMLOutput output)
           throws org.apache.commons.jelly.JellyTagException
Specified by:
doTag in interface org.apache.commons.jelly.Tag
Throws:
org.apache.commons.jelly.JellyTagException

setSelector

public void setSelector(java.lang.String selector)
Sets the optional JMS Message selector for the subscription


getMessageListener

public javax.jms.MessageListener getMessageListener()
Returns the messageListener.

Returns:
MessageListener

setMessageListener

public void setMessageListener(javax.jms.MessageListener messageListener)
Sets the JMS messageListener used ot consume JMS messages on the given destination

Specified by:
setMessageListener in interface ConsumerTag