|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
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 |
---|
public static final int MESSAGE_FLAG_EMPTY_BODY
Constructor Detail |
---|
public MessageFactory()
Method Detail |
---|
public MessageInterface newMessage()
MessageInterface
public MessageInterface newMessage(java.lang.Object body)
body
- message body.
MessageInterface
public MessageInterface newMessage(MessageInterface message, int flags)
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:
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.
message
- existing message to copy from.flags
- additional information about how to create this message.
MessageInterface
|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |