*** This class provides Binary Compatibility only, not Source Compatibility ***
Class MessageFactory
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
FieldsModifier and TypeFieldDescriptionstatic final intCreate a message with an empty body. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate a new message with an empty body.newMessage(MessageInterface message, int flags) Create a new message based on an existing message.newMessage(Object body) Create a new message with the specified body.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
MESSAGE_FLAG_EMPTY_BODY
public static final int MESSAGE_FLAG_EMPTY_BODYCreate a message with an empty body.- See Also:
-
-
Constructor Details
-
MessageFactory
public MessageFactory()
-
-
Method Details
-
newMessage
Create a new message with an empty body.- Returns:
- generated message.
- See Also:
-
newMessage
Create a new message with the specified body.- Parameters:
body- message body.- Returns:
- generated message.
- See Also:
-
newMessage
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:
- whether or not to set the body to
empty.
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:
- whether or not to set the body to
-