org.exolab.jmscts.core
Class MessageCreator

java.lang.Object
  |
  +--org.exolab.jmscts.core.MessageFactory
        |
        +--org.exolab.jmscts.core.MessageCreator

public class MessageCreator
extends MessageFactory

Helper class for creating, and optionally populating messages

Version:
$Revision: 1.3 $ $Date: 2004/01/31 13:44:24 $
Author:
Tim Anderson
See Also:
MessagePopulator

Constructor Summary
MessageCreator(javax.jms.Session session, MessagePopulator populator)
          Construct a new MesssageCreator
 
Method Summary
protected  javax.jms.BytesMessage createBytesMessage()
          Create a new BytesMessage
protected  javax.jms.MapMessage createMapMessage()
          Create a new MapMessage
protected  javax.jms.Message createMessage()
          Create a new Message
protected  javax.jms.ObjectMessage createObjectMessage()
          Create a new ObjectMessage
protected  javax.jms.StreamMessage createStreamMessage()
          Create a new StreamMessage
protected  javax.jms.TextMessage createTextMessage()
          Create a new TextMessage
 
Methods inherited from class org.exolab.jmscts.core.MessageFactory
create, populate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageCreator

public MessageCreator(javax.jms.Session session,
                      MessagePopulator populator)
Construct a new MesssageCreator
Parameters:
session - the session to create messages with
populator - the message populator, or null, if messages aren't to be populated
Method Detail

createBytesMessage

protected javax.jms.BytesMessage createBytesMessage()
                                             throws javax.jms.JMSException
Create a new BytesMessage
Overrides:
createBytesMessage in class MessageFactory
Returns:
the new message
Throws:
javax.jms.JMSException - for any error

createMapMessage

protected javax.jms.MapMessage createMapMessage()
                                         throws javax.jms.JMSException
Create a new MapMessage
Overrides:
createMapMessage in class MessageFactory
Returns:
the new message
Throws:
javax.jms.JMSException - for any error

createMessage

protected javax.jms.Message createMessage()
                                   throws javax.jms.JMSException
Create a new Message
Overrides:
createMessage in class MessageFactory
Returns:
the new message
Throws:
javax.jms.JMSException - for any error

createObjectMessage

protected javax.jms.ObjectMessage createObjectMessage()
                                               throws javax.jms.JMSException
Create a new ObjectMessage
Overrides:
createObjectMessage in class MessageFactory
Returns:
the new message
Throws:
javax.jms.JMSException - for any error

createStreamMessage

protected javax.jms.StreamMessage createStreamMessage()
                                               throws javax.jms.JMSException
Create a new StreamMessage
Overrides:
createStreamMessage in class MessageFactory
Returns:
the new message
Throws:
javax.jms.JMSException - for any error

createTextMessage

protected javax.jms.TextMessage createTextMessage()
                                           throws javax.jms.JMSException
Create a new TextMessage
Overrides:
createTextMessage in class MessageFactory
Returns:
the new message
Throws:
javax.jms.JMSException - for any error


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