Sonic ESB API

com.sonicsw.xq
Interface XQMessageFactory


public interface XQMessageFactory

The XQMessageFactory is used for creating implementations of XQMessages. By default the XQMessageFactory will create JMS XQMessages, however, if an endpoint is specified then the factory will call into the endpoint to create a message of the correct type.


Method Summary
 XQMessage createMessage()
          Create a new XQMessage.
 XQMessage createMessage(XQEndpoint endpoint)
          Create a new XQMessage based on the specified XQEndpoint.
 XQMessage createMessage(XQMessage message)
          Create a new XQMessage which is a clone of the specified message.
 java.lang.String getCorrelationId()
          Gets the CorrelationID for this messageFactory
 XQAddress getReplyTo()
          Get the Reply To address for this messageFactory
 void setCorrelationId(java.lang.String id)
          Sets the CorrelationID for this message.
 void setReplyTo(XQAddress replyTo)
          Sets the Reply To address for this message.
 

Method Detail

createMessage

XQMessage createMessage()
Create a new XQMessage. The message will be a XQJMSMessage.

Returns:
the new XQJMSMessage

createMessage

XQMessage createMessage(XQMessage message)
                        throws XQMessageException
Create a new XQMessage which is a clone of the specified message.

Parameters:
message - the XQMessage you want to clone.
Returns:
the new message
Throws:
XQMessageException - thrown if we fail to clone the message

createMessage

XQMessage createMessage(XQEndpoint endpoint)
                        throws XQEndpointException
Create a new XQMessage based on the specified XQEndpoint. The message factory will call into the XQEndpoint implementation to create a XQMessage compatible with that endpoint.

Parameters:
endpoint - the endpoint to to use to create the message
Returns:
the new message
Throws:
XQEndpointException - thrown if the endpoint fails to create the message

setReplyTo

void setReplyTo(XQAddress replyTo)
Sets the Reply To address for this message.

Parameters:
replyTo - to set as the replyTo address for all new messages created by this messageFactory

getReplyTo

XQAddress getReplyTo()
Get the Reply To address for this messageFactory

Returns:
The XQAddress, null if no ReplyTo is defined for the messageFactory

getCorrelationId

java.lang.String getCorrelationId()
Gets the CorrelationID for this messageFactory

Returns:
String

setCorrelationId

void setCorrelationId(java.lang.String id)
Sets the CorrelationID for this message.

Parameters:
id - String to set as the correlationId for all new messages created by this messageFactory

Sonic ESB API

Copyright © 2001-2012 Progress Software Corporation. All Rights Reserved.
HTML formatted on 13-Mar-2012.