@Immutable public abstract class MessageEvent extends BaseMessageEvent
It requires a type and a message id that serves to uniquely identify each
message. It can optionally have information about the message size.
| Modifier and Type | Class and Description |
|---|---|
static class |
MessageEvent.Builder
Builder class for
MessageEvent. |
static class |
MessageEvent.Type
Available types for a
MessageEvent. |
| Modifier and Type | Method and Description |
|---|---|
static MessageEvent.Builder |
builder(MessageEvent.Type type,
long messageId)
Returns a new
MessageEvent.Builder with default values. |
abstract long |
getCompressedMessageSize()
Returns the compressed size in bytes of the
MessageEvent. |
abstract long |
getMessageId()
Returns the message id argument that serves to uniquely identify each message.
|
abstract MessageEvent.Type |
getType()
Returns the type of the
MessageEvent. |
abstract long |
getUncompressedMessageSize()
Returns the uncompressed size in bytes of the
MessageEvent. |
public static MessageEvent.Builder builder(MessageEvent.Type type, long messageId)
MessageEvent.Builder with default values.type - designates whether this is a send or receive message.messageId - serves to uniquely identify each message.Builder with default values.NullPointerException - if type is null.public abstract MessageEvent.Type getType()
MessageEvent.MessageEvent.public abstract long getMessageId()
MessageEvent.public abstract long getUncompressedMessageSize()
MessageEvent.MessageEvent.public abstract long getCompressedMessageSize()
MessageEvent.MessageEvent.