@Immutable public class CustomMessageEvent extends Object
| Modifier and Type | Field and Description |
|---|---|
protected com.google.protobuf.ByteString |
binaryPayload
The binary payload from the message
|
protected String |
destinationId
The destination ID from the message
|
protected String |
namespace
The namespace from the message
|
protected CastChannel.CastMessage.PayloadType |
payloadType
|
protected String |
sourceId
The source ID from the message
|
protected String |
stringPayload
The string payload from the message
|
| Constructor and Description |
|---|
CustomMessageEvent(String sourceId,
String destinationId,
String namespace,
com.google.protobuf.ByteString binaryPayload)
Creates a new
BINARY instance. |
CustomMessageEvent(String sourceId,
String destinationId,
String namespace,
String stringPayload)
Creates a new
STRING instance. |
| Modifier and Type | Method and Description |
|---|---|
com.google.protobuf.ByteString |
getBinaryPayload() |
String |
getDestinationId() |
String |
getNamespace() |
CastChannel.CastMessage.PayloadType |
getPayloadType() |
String |
getSourceId() |
String |
getStringPayload() |
String |
toString() |
@Nullable protected final com.google.protobuf.ByteString binaryPayload
@Nonnull protected final CastChannel.CastMessage.PayloadType payloadType
public CustomMessageEvent(@Nullable String sourceId, @Nullable String destinationId, @Nullable String namespace, @Nullable String stringPayload)
STRING instance.sourceId - the source ID from the message.destinationId - the destination ID from the message.namespace - the namespace from the message.stringPayload - the string payload from the message.public CustomMessageEvent(@Nullable String sourceId, @Nullable String destinationId, @Nullable String namespace, @Nullable com.google.protobuf.ByteString binaryPayload)
BINARY instance.sourceId - the source ID from the message.destinationId - the destination ID from the message.namespace - the namespace from the message.binaryPayload - the binary payload from the message.@Nullable public String getStringPayload()
String payload if the source message is of type
STRING. If the message is BINARY, always
null.@Nullable public com.google.protobuf.ByteString getBinaryPayload()
ByteString payload if the source message is of type
BINARY. If the message is STRING, always
null.@Nonnull public CastChannel.CastMessage.PayloadType getPayloadType()
Copyright © 2022. All rights reserved.