org.exolab.jmscts.core
Interface MessageSender


public interface MessageSender

Interface for sending messages using a MessageProducer

Version:
$Revision: 1.5 $ $Date: 2004/02/03 21:52:06 $
Author:
Tim Anderson

Method Summary
 void close()
          Close the underlying MessageProducer
 javax.jms.Destination getDestination()
          Return the destination associated with the MessageProducer
 void send(javax.jms.Message message, int count)
          Send messages to a destination
 void send(javax.jms.Message message, int count, long timeToLive)
          Send messages to a destination
 void send(javax.jms.Message message, int count, MessagePopulator populator)
          Send messages to a destination, invoking a message populator prior to each message being sent
 void send(javax.jms.Message message, int count, MessagePopulator populator, long timeToLive)
          Send messages to a destination, invoking a message populator prior to each message being sent
 

Method Detail

send

public void send(javax.jms.Message message,
                 int count)
          throws javax.jms.JMSException
Send messages to a destination
Parameters:
message - the message to send
count - the number of times to send the message
Throws:
javax.jms.JMSException - if any of the JMS operations fail

send

public void send(javax.jms.Message message,
                 int count,
                 long timeToLive)
          throws javax.jms.JMSException
Send messages to a destination
Parameters:
message - the message to send
count - the number of times to send the message
timeToLive - the message time-to-live
Throws:
javax.jms.JMSException - if any of the JMS operations fail

send

public void send(javax.jms.Message message,
                 int count,
                 MessagePopulator populator)
          throws javax.jms.JMSException
Send messages to a destination, invoking a message populator prior to each message being sent
Parameters:
message - the message to send
count - the number of times to send the message
populator - the message populator
Throws:
javax.jms.JMSException - if any of the JMS operations fail

send

public void send(javax.jms.Message message,
                 int count,
                 MessagePopulator populator,
                 long timeToLive)
          throws javax.jms.JMSException
Send messages to a destination, invoking a message populator prior to each message being sent
Parameters:
message - the message to send
count - the number of times to send the message
populator - the message populator
timeToLive - the message time-to-live
Throws:
javax.jms.JMSException - if any of the JMS operations fail

getDestination

public javax.jms.Destination getDestination()
                                     throws javax.jms.JMSException
Return the destination associated with the MessageProducer
Returns:
the destination to send messages to
Throws:
javax.jms.JMSException - if the operation fails

close

public void close()
           throws javax.jms.JMSException
Close the underlying MessageProducer
Throws:
javax.jms.JMSException - if the operation fails


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