org.exolab.jmscts.core
Class ThreadedSender

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--org.exolab.jmscts.core.ThreadedAction
              |
              +--org.exolab.jmscts.core.ThreadedSender
All Implemented Interfaces:
java.lang.Runnable

public class ThreadedSender
extends ThreadedAction

Helper class which performs message production in a separate thread

Version:
$Revision: 1.2 $ $Date: 2004/01/31 13:44:24 $
Author:
Tim Anderson

Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ThreadedSender(MessageSender sender, javax.jms.Message message, int count)
          Construct a new ThreadedSender
ThreadedSender(MessageSender sender, javax.jms.Message message, int count, CompletionListener listener)
          Construct a new ThreadedSender
 
Method Summary
 void runProtected()
          Run the action
 
Methods inherited from class org.exolab.jmscts.core.ThreadedAction
getElapsedTime, getException, run, setException, waitForCompletion, waitForCompletion
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ThreadedSender

public ThreadedSender(MessageSender sender,
                      javax.jms.Message message,
                      int count)
Construct a new ThreadedSender
Parameters:
sender - the message sender
message - the message to send
count - the no. of times to send the message

ThreadedSender

public ThreadedSender(MessageSender sender,
                      javax.jms.Message message,
                      int count,
                      CompletionListener listener)
Construct a new ThreadedSender
Parameters:
sender - the message sender
message - the message to send
count - the no. of times to send the message
listener - the listener to notify on completion
Method Detail

runProtected

public void runProtected()
                  throws java.lang.Exception
Run the action
Overrides:
runProtected in class ThreadedAction
Throws:
java.lang.Exception - for any error


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