MessageEvent Stay organized with collections Save and categorize content based on your preferences.
Page Summary
MessageEvent provides information about a message received by a listener.
It includes methods to retrieve the message data, path, request ID, and source node ID.
public interfaceMessageEvent
Information about a message received by alistener.
Public Method Summary
| abstract byte[] | getData() Returns the data passed by the message. |
| abstractString | getPath() Returns the path the message is being delivered to |
| abstract int | getRequestId() Returns the request id of the message, generated by the sender |
| abstractString | getSourceNodeId() Returns the node ID of the sender. |
Public Methods
public abstract byte[]getData()
Returns the data passed by the message.
public abstractStringgetPath()
Returns the path the message is being delivered to
public abstract intgetRequestId()
Returns the request id of the message, generated by the sender
public abstractStringgetSourceNodeId()
Returns the node ID of the sender.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-11-21 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-11-21 UTC."],[],["The `MessageEvent` interface provides details about a received message. Key information includes: `getData()`, which retrieves the message's data as a byte array; `getPath()`, which gets the message's delivery path; `getRequestId()`, which returns the sender-generated message ID; and `getSourceNodeId()`, which reveals the ID of the message's sender. A listener receives these details.\n"]]