Class SocketMessageMetadata
java.lang.Object
com.github.twitch4j.eventsub.socket.domain.SocketMessageMetadata
An object that identifies the message sent over EventSub Websockets.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
An ID that uniquely identifies the message.The UTC date and time that the message was sent.The type of message.@Nullable SubscriptionType<?,
?, ?> @Nullable String
The type of event sent in the message.@Nullable String
The version number of the subscription type’s definition.int
hashCode()
toString()
-
Constructor Details
-
SocketMessageMetadata
public SocketMessageMetadata()
-
-
Method Details
-
getParsedSubscriptionType
- Returns:
- the parsed
SubscriptionType
associated with the raw type and version contained in this metadata for a notification or revocation.
-
getMessageId
An ID that uniquely identifies the message.Twitch sends messages at least once, but if Twitch is unsure of whether you received a notification, it’ll resend the message. This means you may receive a notification twice. If Twitch resends the message, the message ID will be the same.
-
getMessageType
The type of message. -
getMessageTimestamp
The UTC date and time that the message was sent. -
getSubscriptionType
The type of event sent in the message.Only present if
getMessageType()
isSocketMessageType.NOTIFICATION
orSocketMessageType.REVOCATION
. -
getSubscriptionVersion
The version number of the subscription type’s definition.This is the same value specified in the subscription request.
Only present if
getMessageType()
isSocketMessageType.NOTIFICATION
orSocketMessageType.REVOCATION
. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-