Package org.symphonyoss.s2.fugue.pubsub
Class PubSubMessage
- java.lang.Object
-
- org.symphonyoss.s2.fugue.pubsub.PubSubMessage
-
- All Implemented Interfaces:
IPubSubMessage
public class PubSubMessage extends Object implements IPubSubMessage
A payload sent or received over a pub sub channel.- Author:
- Bruce Skingle
-
-
Field Summary
-
Fields inherited from interface org.symphonyoss.s2.fugue.pubsub.IPubSubMessage
FINAL_ATTRIBUTE, PAYLOAD_TYPE_ATTRIBUTE, TENANT_ID_ATTRIBUTE
-
-
Constructor Summary
Constructors Constructor Description PubSubMessage(String payload, org.symphonyoss.s2.fugue.core.trace.ITraceContext traceContext, String payloadType)Constructor.PubSubMessage(String payload, org.symphonyoss.s2.fugue.core.trace.ITraceContext traceContext, String payloadType, String tenantId)Constructor.PubSubMessage(String payload, org.symphonyoss.s2.fugue.core.trace.ITraceContext traceContext, Map<String,String> attributes)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>getAttributes()StringgetPayload()org.symphonyoss.s2.fugue.core.trace.ITraceContextgetTraceContext()
-
-
-
Constructor Detail
-
PubSubMessage
public PubSubMessage(String payload, org.symphonyoss.s2.fugue.core.trace.ITraceContext traceContext, String payloadType)
Constructor.- Parameters:
payload- The payloadtraceContext- A trace contextpayloadType- The payload type attribute
-
PubSubMessage
public PubSubMessage(String payload, org.symphonyoss.s2.fugue.core.trace.ITraceContext traceContext, String payloadType, String tenantId)
Constructor.- Parameters:
payload- The payloadtraceContext- A trace contextpayloadType- The payload type attributetenantId-
-
-
Method Detail
-
getPayload
public String getPayload()
- Specified by:
getPayloadin interfaceIPubSubMessage- Returns:
- The message payload
-
getAttributes
@Nonnull public Map<String,String> getAttributes()
- Specified by:
getAttributesin interfaceIPubSubMessage- Returns:
- Any optional attributes. If the object was created with null attributes an empty map is returned.
-
getTraceContext
public org.symphonyoss.s2.fugue.core.trace.ITraceContext getTraceContext()
- Specified by:
getTraceContextin interfaceIPubSubMessage- Returns:
- The trace context.
-
-