toolbox.services.jms.simple
Interface SimpleProducerService

Package class diagram package SimpleProducerService
All Known Implementing Classes:
SimpleProducerServiceImpl

public interface SimpleProducerService

Interface that defines a simple message production interface.

This interface is provided as a convenience for simple message production requirements.


Method Summary
 java.lang.String send(byte[] msg, java.lang.String producer, java.util.Map props)
          Send the given byte array using the named producer.
 java.lang.String send(byte[] msg, java.lang.String producer, java.lang.String correlation, java.util.Map props, javax.jms.Destination dest)
          Send the given byte array using the named producer.
 java.lang.String send(java.io.InputStream msg, java.lang.String producer, java.util.Map props)
          Send the content of the given stream using the named producer.
 java.lang.String send(java.io.InputStream msg, java.lang.String producer, java.lang.String correlation, java.util.Map props, javax.jms.Destination dest)
          Send the content of the given stream using the named producer.
 java.lang.String send(java.util.Map msg, java.lang.String producer, java.util.Map props)
          Send the given Map instance using the named producer.
 java.lang.String send(java.util.Map msg, java.lang.String producer, java.lang.String correlation, java.util.Map props, javax.jms.Destination dest)
          Send the given Map instance using the named producer.
 java.lang.String send(java.lang.Object msg, java.lang.String producer, java.util.Map props)
          Send the given Object instance using the named producer.
 java.lang.String send(java.lang.Object msg, java.lang.String producer, java.lang.String correlation, java.util.Map props, javax.jms.Destination dest)
          Send the given Object instance using the named producer.
 java.lang.String send(java.lang.String msg, java.lang.String producer, java.util.Map props)
          Send the given String using the named producer.
 java.lang.String send(java.lang.String msg, java.lang.String producer, java.lang.String correlation, java.util.Map props, javax.jms.Destination dest)
          Send the given String using the named producer.
 void setDefaultMessageListener(javax.jms.MessageListener listener)
          Set the default MessageListener that this service must use to consume reply messages.
 void start(java.lang.String producer)
          Start the reply consumer of the named producer.
 

Method Detail

send

java.lang.String send(java.lang.String msg,
                      java.lang.String producer,
                      java.lang.String correlation,
                      java.util.Map props,
                      javax.jms.Destination dest)
                      throws ServiceException
Send the given String using the named producer.

Parameters:
msg - String containing the message content.
producer - String indicating the named producer that must to used to send the message.
correlation - String that must be used as the JMSCorrelationID.
props - Map instance containing simple message properties. Can be null.
dest - Target destination.
Returns:
String containing the message id of the sent message.
Throws:
ServiceException - if the message cannot be sent.

send

java.lang.String send(java.lang.String msg,
                      java.lang.String producer,
                      java.util.Map props)
                      throws ServiceException
Send the given String using the named producer.

Parameters:
msg - String containing the message content.
producer - String indicating the named producer that must to used to send the message.
props - Map instance containing simple message properties. Can be null.
Returns:
String containing the message id of the sent message.
Throws:
ServiceException - if the message cannot be sent.

send

java.lang.String send(byte[] msg,
                      java.lang.String producer,
                      java.lang.String correlation,
                      java.util.Map props,
                      javax.jms.Destination dest)
                      throws ServiceException
Send the given byte array using the named producer.

Parameters:
msg - A byte array containing the message content.
producer - String indicating the named producer that must to used to send the message.
correlation - String that must be used as the JMSCorrelationID.
props - Map instance containing simple message properties. Can be null.
dest - Target destination.
Returns:
String containing the message id of the sent message.
Throws:
ServiceException - if the message cannot be sent.

send

java.lang.String send(byte[] msg,
                      java.lang.String producer,
                      java.util.Map props)
                      throws ServiceException
Send the given byte array using the named producer.

Parameters:
msg - A byte array containing the message content.
producer - String indicating the named producer that must to used to send the message.
props - Map instance containing simple message properties. Can be null.
Returns:
String containing the message id of the sent message.
Throws:
ServiceException - if the message cannot be sent.

send

java.lang.String send(java.io.InputStream msg,
                      java.lang.String producer,
                      java.lang.String correlation,
                      java.util.Map props,
                      javax.jms.Destination dest)
                      throws ServiceException
Send the content of the given stream using the named producer.

Parameters:
msg - InputStream instance pointing to the message content.
producer - String indicating the named producer that must to used to send the message.
correlation - String that must be used as the JMSCorrelationID.
props - Map instance containing simple message properties. Can be null.
dest - Target destination.
Returns:
String containing the message id of the sent message.
Throws:
ServiceException - if the message cannot be sent.

send

java.lang.String send(java.io.InputStream msg,
                      java.lang.String producer,
                      java.util.Map props)
                      throws ServiceException
Send the content of the given stream using the named producer.

Parameters:
msg - InputStream instance pointing to the message content.
producer - String indicating the named producer that must to used to send the message.
props - Map instance containing simple message properties. Can be null.
Returns:
String containing the message id of the sent message.
Throws:
ServiceException - if the message cannot be sent.

send

java.lang.String send(java.util.Map msg,
                      java.lang.String producer,
                      java.lang.String correlation,
                      java.util.Map props,
                      javax.jms.Destination dest)
                      throws ServiceException
Send the given Map instance using the named producer.

Parameters:
msg - Map instance containing to the message content.
producer - String indicating the named producer that must to used to send the message.
correlation - String that must be used as the JMSCorrelationID.
props - Map instance containing simple message properties. Can be null.
dest - Target destination.
Returns:
String containing the message id of the sent message.
Throws:
ServiceException - if the message cannot be sent.

send

java.lang.String send(java.util.Map msg,
                      java.lang.String producer,
                      java.util.Map props)
                      throws ServiceException
Send the given Map instance using the named producer.

Parameters:
msg - Map instance containing to the message content.
producer - String indicating the named producer that must to used to send the message.
props - Map instance containing simple message properties. Can be null.
Returns:
String containing the message id of the sent message.
Throws:
ServiceException - if the message cannot be sent.

send

java.lang.String send(java.lang.Object msg,
                      java.lang.String producer,
                      java.lang.String correlation,
                      java.util.Map props,
                      javax.jms.Destination dest)
                      throws ServiceException
Send the given Object instance using the named producer.

Parameters:
msg - Object instance containing to the message content.
producer - String indicating the named producer that must to used to send the message.
correlation - String that must be used as the JMSCorrelationID.
props - Map instance containing simple message properties. Can be null.
dest - Target destination.
Returns:
String containing the message id of the sent message.
Throws:
ServiceException - if the message cannot be sent.

send

java.lang.String send(java.lang.Object msg,
                      java.lang.String producer,
                      java.util.Map props)
                      throws ServiceException
Send the given Object instance using the named producer.

Parameters:
msg - Object instance containing to the message content.
producer - String indicating the named producer that must to used to send the message.
props - Map instance containing simple message properties. Can be null.
Returns:
String containing the message id of the sent message.
Throws:
ServiceException - if the message cannot be sent.

start

void start(java.lang.String producer)
           throws ServiceException
Start the reply consumer of the named producer.

Parameters:
producer - String indicating the named producer that must start listener for replies.
Throws:
ServiceException - if the producer cannot be started.

setDefaultMessageListener

void setDefaultMessageListener(javax.jms.MessageListener listener)
Set the default MessageListener that this service must use to consume reply messages.

Parameters:
listener - MessageListener implementation.