Arch4J 1.1

org.arch4j.messaging
Class MessageFacade

java.lang.Object
  |
  +--org.arch4j.messaging.MessageFacade
Direct Known Subclasses:
MessageQueueFacade, MessageTopicFacade

public abstract class MessageFacade
extends Object

This abstract class provides simplified and provider-independent access to Messages and commit/rollback functionality. It is implemented by the MessageQueueFacade and MessageTopicFacade classes.

Version:
1.0
Author:
David Colwell

Constructor Summary
MessageFacade()
           
 
Method Summary
 void commit()
          Commit all messages done in this transaction and releases any locks currently held.
 javax.jms.BytesMessage createBytesMessage()
          Create a BytesMessage.
 javax.jms.MapMessage createMapMessage()
          Create a MapMessage.
 javax.jms.Message createMessage()
          Create a Message.
 javax.jms.ObjectMessage createObjectMessage()
          Create an ObjectMessage.
 javax.jms.ObjectMessage createObjectMessage(Serializable object)
          Create an initialized ObjectMessage.
 javax.jms.StreamMessage createStreamMessage()
          Create a StreamMessage.
 javax.jms.TextMessage createTextMessage()
          Create a TextMessage.
 javax.jms.TextMessage createTextMessage(StringBuffer stringBuffer)
          Create a TextMessage.
protected abstract  javax.jms.Session getSession()
          Returns the Session reference associated with the implementation object.
 void rollback()
          Rollback any messages done in this transaction and releases any locks currently held.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageFacade

public MessageFacade()
Method Detail

getSession

protected abstract javax.jms.Session getSession()
Returns the Session reference associated with the implementation object.


commit

public void commit()
Commit all messages done in this transaction and releases any locks currently held.


rollback

public void rollback()
Rollback any messages done in this transaction and releases any locks currently held.


createBytesMessage

public javax.jms.BytesMessage createBytesMessage()
Create a BytesMessage. A BytesMessage is used to send a message containing a stream of uninterpreted bytes.


createMapMessage

public javax.jms.MapMessage createMapMessage()
Create a MapMessage. A MapMessage is used to send a self-defining set of name-value pairs where names are Strings and values are Java primitive types.


createMessage

public javax.jms.Message createMessage()
Create a Message. The Message interface is the root interface of all JMS messages. It holds all the standard message header information. It can be sent when a message containing only header information is sufficient.


createObjectMessage

public javax.jms.ObjectMessage createObjectMessage()
Create an ObjectMessage. An ObjectMessage is used to send a message that containing a serializable Java object.


createObjectMessage

public javax.jms.ObjectMessage createObjectMessage(Serializable object)
Create an initialized ObjectMessage. An ObjectMessage is used to send a message that containing a serializable Java object.

Parameters:
object - the object used to initialize this message.

createStreamMessage

public javax.jms.StreamMessage createStreamMessage()
Create a StreamMessage. A StreamMessage is used to send a self-defining stream of Java primitives.


createTextMessage

public javax.jms.TextMessage createTextMessage()
Create a TextMessage. A TextMessage is used to send a message containing a StringBuffer.


createTextMessage

public javax.jms.TextMessage createTextMessage(StringBuffer stringBuffer)
Create a TextMessage. A TextMessage is used to send a message containing a StringBuffer.


Arch4J 1.1

Copyright © 2000-2004 SpiderLogic, a service of Wipfli Ullrich Bertelson LLP.