Class Message
-
- All Implemented Interfaces:
public final class Message
-
-
Method Summary
Modifier and Type Method Description final StringgetId()A unique identifier for this message. final StringgetComponent()The component the message is sent from (e.g. final StringgetEvent()The event that this message is about: "submit", "display", "send" final MetadatagetMetadata()The metadata associated with the message, which includes its url final StringgetJsonData()Data, represented in a json object string, to send along with the message. final Messagereplacing(String event, String jsonData)Convenience method for creating a new message from an existing message, replacing its eventand/orjsonData.final <T extends Any> Messagereplacing(String event, T data)final <T extends Any> Tdata()-
-
Method Detail
-
getId
final String getId()
A unique identifier for this message. When you reply to the web with a message, this identifier is used to find its previously sent message.
-
getComponent
final String getComponent()
The component the message is sent from (e.g. - "form", "page", etc)
-
getMetadata
final Metadata getMetadata()
The metadata associated with the message, which includes its url
-
getJsonData
final String getJsonData()
Data, represented in a json object string, to send along with the message. For a "page" component, this might be
{"title": "Page Title"}
-
replacing
final Message replacing(String event, String jsonData)
Convenience method for creating a new message from an existing message, replacing its
eventand/orjsonData. The new message can be sent back to the over the bridge to notify the web of a change/action.
-
-
-
-