***  This class provides Binary Compatibility only, not Source Compatibility  ***

com.sas.services.events.broker
Class MessageFactory

com.sas.services.events.broker.MessageFactory

public class MessageFactory

This class produces Event Broker service messages that can be used within process nodes to create new messages in order to propagate them to other downstream process nodes within a process flow for further processing.

Usage

Use this class within a process node to generate new messages.

Since:
1.0

Field Summary
static int MESSAGE_FLAG_EMPTY_BODY
          Create a message with an empty body.
 
Constructor Summary
MessageFactory()
           
 
Method Summary
 MessageInterface newMessage()
          Create a new message with an empty body.
 MessageInterface newMessage(MessageInterface message, int flags)
          Create a new message based on an existing message.
 MessageInterface newMessage(java.lang.Object body)
          Create a new message with the specified body.
 

Field Detail

MESSAGE_FLAG_EMPTY_BODY

public static final int MESSAGE_FLAG_EMPTY_BODY
Create a message with an empty body.

See Also:
Constant Field Values
Constructor Detail

MessageFactory

public MessageFactory()
Method Detail

newMessage

public MessageInterface newMessage()
Create a new message with an empty body.

Returns:
generated message.
See Also:
MessageInterface

newMessage

public MessageInterface newMessage(java.lang.Object body)
Create a new message with the specified body.

Parameters:
body - message body.
Returns:
generated message.
See Also:
MessageInterface

newMessage

public MessageInterface newMessage(MessageInterface message,
                                   int flags)
Create a new message based on an existing message.

This is identical to cloning.

If the body of the existing message is a DOM node, the new message will be created with the same owning Document. That is, the new message will have the same DOM Document owner as the existing message. Having the same owning Document, allows DOM nodes to copy (append/insert) to and from each other. Otherwise, when nodes belong to different documents, they must first be imported into a document before they can be used.

Using this method will also ensure that other message attributes are carried forward such as the associated event name and security context.

Additionally, you can specify the following information:

When setting a message body to empty, the new message body is saved as an empty string object unless the existing message body is a DOM node. In that case, a new empty DOM node (DocumentFragement) is created from the existing message's owning document.

Parameters:
message - existing message to copy from.
flags - additional information about how to create this message.
Returns:
generated message.
See Also:
MessageInterface

***  This class provides Binary Compatibility only, not Source Compatibility  ***




Copyright © 2009 SAS Institute Inc. All Rights Reserved.