Interface Message
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
MessageDefault
public interface Message extends Serializable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description MessageAttributesattributes()This is a 'nice to have' method to make getting the attributes more readable from the Script language e.g.<T,StreamType,U extends TypedContent<T,StreamType>>
Ucontent()This is a 'nice to have' method to make getting the content more readable from the Script language e.g.MessageAttributesgetAttributes()This method is needed by Script engine to access this object's properties.<T,StreamType,U extends TypedContent<T,StreamType>>
UgetContent()default <T> TgetPayload()Returns the message payload.<T> Tpayload()Returns the message payload.
-
-
-
Method Detail
-
getPayload
default <T> T getPayload()
Returns the message payload. This method automatically consumes the payload stream if it is a stream.
-
payload
<T> T payload()
Returns the message payload. This method automatically consumes the payload stream if it is a stream.
-
getContent
<T,StreamType,U extends TypedContent<T,StreamType>> U getContent()
-
content
<T,StreamType,U extends TypedContent<T,StreamType>> U content()
This is a 'nice to have' method to make getting the content more readable from the Script language e.g. message.content() instead of message.getContent().
-
getAttributes
MessageAttributes getAttributes()
This method is needed by Script engine to access this object's properties.- Returns:
- the message attributes.
-
attributes
MessageAttributes attributes()
This is a 'nice to have' method to make getting the attributes more readable from the Script language e.g. message.attributes() instead of message.getAttributes().- Returns:
- the message attributes.
-
-