*** This interface provides Binary Compatibility only, not Source Compatibility ***
Package com.sas.services.events.broker
Interface MessageInterface
@SASScope("ALL")
@BinaryCompatibilityOnly
public interface MessageInterface
A Message Interface is used to obtain information about an event that
was received by an
EventBroker service.
Such information includes:
- name of event
- name of message
- associated properties
- security context
- body of message
Usage
Allow process nodes and dynamic listeners to operate on a message.- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionObjectclone()Clone a copy of this message.ObjectgetBody()Get body of message.DocumentFragmentGet body of message as a DocumentFragment.StringGet body of message as a string independent of its underlying format.StringGet the event name associated with this message.StringGet the message name.MapGet properties associated with this event message.Get security context.StringGet source process node name.voidsetBody(Object body) Set body of message.
-
Method Details
-
clone
Object clone()Clone a copy of this message.- Returns:
- clone of this message.
-
getEventName
String getEventName()Get the event name associated with this message.- Returns:
- name of the event that originated this message.
-
getMessageName
String getMessageName()Get the message name.The initial, starting message that is created by the
EventBroker Servicewhen an event is triggered is always named start.- Returns:
- name of the message.
-
setBody
void setBody(Object body) Set body of message.- Parameters:
body- message body.
-
getBody
Object getBody()Get body of message.- Returns:
- body message body.
-
getBodyAsDocumentFragment
Get body of message as a DocumentFragment.The underlying message body must either already by a DocumentFragment or an object that can be serialized into DocumentFragment such as a String.
The returned document fragment is mutable. That is, updates to it are reflected in the body of the message.
- Returns:
- message body.
- Throws:
MessageBodyConversionException- if problems occur.
-
getBodyAsString
Get body of message as a string independent of its underlying format.- Returns:
- message body.
- Throws:
MessageBodyConversionException- if problems occur.
-
getProperties
Map getProperties()Get properties associated with this event message.- Returns:
- properties associated with this event message.
-
getSecurityContext
SecurityContext getSecurityContext()Get security context.- Returns:
- securityContext security context associated with the event.
-
getSourceNodeName
String getSourceNodeName()Get source process node name.It may be useful for process flow nodes to determine which predecessor node a message was propagated from.
- Returns:
- sourceNodeName name of the process node that propagated this message
or
blankif this in the initial, starting message.
-