org.exolab.jmscts.tools
Class MessagingTool

java.lang.Object
  |
  +--org.exolab.jmscts.tools.MessagingTool
Direct Known Subclasses:
Receive, Send

public abstract class MessagingTool
extends java.lang.Object

Messaging tool helper

Version:
$Revision: 1.2 $ $Date: 2004/02/03 21:52:12 $
Author:
Tim Anderson

Constructor Summary
MessagingTool()
           
 
Method Summary
protected abstract  void doInvoke()
          Invoke the messaging tool
protected  TestContext getContext()
          Returns the connection factory test context
protected  int getCount()
          Returns the number of messages to process
protected  javax.jms.Destination getDestination()
          Returns the destination
protected  void initialise()
          Initialise the tool
 void invoke()
          Invoke the messaging tool
protected  void log(javax.jms.Message message)
          Log a message
 void setConfig(java.lang.String path)
          Set the configuration
 void setConnectionFactory(java.lang.String name)
          Set the connection factory name
 void setCount(int count)
          Sets number of messages to process
 void setDestination(java.lang.String name)
          Set the destination name
 void setVerbose(boolean verbose)
          Enable/disable verbose logging of messages
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessagingTool

public MessagingTool()
Method Detail

setConfig

public void setConfig(java.lang.String path)
Set the configuration
Parameters:
path - the path to the provider configuration

setConnectionFactory

public void setConnectionFactory(java.lang.String name)
Set the connection factory name
Parameters:
name - the connection factory name

setDestination

public void setDestination(java.lang.String name)
Set the destination name
Parameters:
name - the destination name

setCount

public void setCount(int count)
Sets number of messages to process
Parameters:
count - the number of messages to process

setVerbose

public void setVerbose(boolean verbose)
Enable/disable verbose logging of messages
Parameters:
verbose - if true, log message properties

invoke

public void invoke()
            throws java.lang.Exception
Invoke the messaging tool
Throws:
java.lang.Exception - for any error

doInvoke

protected abstract void doInvoke()
                          throws java.lang.Exception
Invoke the messaging tool
Throws:
java.lang.Exception - for any error

initialise

protected void initialise()
                   throws java.lang.Exception
Initialise the tool
Throws:
java.lang.Exception - for any error

getContext

protected TestContext getContext()
Returns the connection factory test context
Returns:
the connection factory test context

getDestination

protected javax.jms.Destination getDestination()
Returns the destination
Returns:
the destination

getCount

protected int getCount()
Returns the number of messages to process
Returns:
the number of messages to process

log

protected void log(javax.jms.Message message)
Log a message
Parameters:
message - the message to log


Copyright © 2001-2004 JMS CTS Team. All Rights Reserved.