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

java.lang.Object
  extended byorg.apache.commons.jelly.TagSupport
      extended byorg.apache.commons.jelly.tags.jms.MessageOperationTag
All Implemented Interfaces:
ConnectionContext, org.apache.commons.jelly.Tag
Direct Known Subclasses:
ReceiveTag, SendTag, StopwatchTag, SubscribeTag

public abstract class MessageOperationTag
extends org.apache.commons.jelly.TagSupport
implements ConnectionContext

An abstract base class for JMS Message operation tags such as send, receive or call.

Version:
$Revision: 1.3 $
Author:
James Strachan

Field Summary
private  org.apache.commons.messenger.Messenger connection
          The Messenger used to access the JMS connection
private  javax.jms.Destination destination
          The Destination
private  java.lang.String subject
          The String subject used to find a destination
 
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
MessageOperationTag()
           
 
Method Summary
protected  org.apache.commons.messenger.Messenger findConnection()
          Strategy Method allowing derived classes to change this behaviour
protected  javax.jms.Destination findDestination(java.lang.String subject)
          Strategy Method allowing derived classes to change this behaviour
 org.apache.commons.messenger.Messenger getConnection()
           
 javax.jms.Destination getDestination()
           
 void setConnection(org.apache.commons.messenger.Messenger connection)
          Sets the Messenger (the JMS connection pool) that will be used to send the message
 void setDestination(javax.jms.Destination destination)
          Sets the JMS Destination to be used by this tag
 void setSubject(java.lang.String subject)
          Sets the subject as a String which is used to create the JMS Destination to be used by this tag
 
Methods inherited from class org.apache.commons.jelly.TagSupport
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isTrim, setBody, setContext, setParent, setTrim, trimBody
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.commons.jelly.Tag
doTag
 

Field Detail

connection

private org.apache.commons.messenger.Messenger connection
The Messenger used to access the JMS connection


destination

private javax.jms.Destination destination
The Destination


subject

private java.lang.String subject
The String subject used to find a destination

Constructor Detail

MessageOperationTag

public MessageOperationTag()
Method Detail

getConnection

public org.apache.commons.messenger.Messenger getConnection()
                                                     throws org.apache.commons.jelly.JellyTagException,
                                                            javax.jms.JMSException
Specified by:
getConnection in interface ConnectionContext
Throws:
org.apache.commons.jelly.JellyTagException
javax.jms.JMSException

setConnection

public void setConnection(org.apache.commons.messenger.Messenger connection)
Sets the Messenger (the JMS connection pool) that will be used to send the message


getDestination

public javax.jms.Destination getDestination()
                                     throws org.apache.commons.jelly.JellyTagException,
                                            javax.jms.JMSException
Throws:
org.apache.commons.jelly.JellyTagException
javax.jms.JMSException

setDestination

public void setDestination(javax.jms.Destination destination)
Sets the JMS Destination to be used by this tag


setSubject

public void setSubject(java.lang.String subject)
Sets the subject as a String which is used to create the JMS Destination to be used by this tag


findConnection

protected org.apache.commons.messenger.Messenger findConnection()
                                                         throws org.apache.commons.jelly.JellyTagException,
                                                                javax.jms.JMSException
Strategy Method allowing derived classes to change this behaviour

Throws:
org.apache.commons.jelly.JellyTagException
javax.jms.JMSException

findDestination

protected javax.jms.Destination findDestination(java.lang.String subject)
                                         throws org.apache.commons.jelly.JellyTagException,
                                                javax.jms.JMSException
Strategy Method allowing derived classes to change this behaviour

Throws:
org.apache.commons.jelly.JellyTagException
javax.jms.JMSException