Class EventSubSocketInformation
java.lang.Object
com.github.twitch4j.eventsub.socket.domain.EventSubSocketInformation
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
The UTC date and time that the connection was created.getId()
An ID that uniquely identifies this WebSocket connection.@Nullable Integer
The maximum number of seconds that you should expect silence before receiving a keepalive message.@Nullable String
The URL to reconnect to if you get aSocketMessageType.SESSION_RECONNECT
message.The connection’s status.int
hashCode()
toString()
-
Constructor Details
-
EventSubSocketInformation
public EventSubSocketInformation()
-
-
Method Details
-
getId
An ID that uniquely identifies this WebSocket connection.Use this ID to set the session_id field in all subscription requests.
-
getStatus
The connection’s status.Upon
SocketMessageType.SESSION_WELCOME
, this will be set toEventSubSocketStatus.CONNECTED
. -
getKeepaliveTimeoutSeconds
The maximum number of seconds that you should expect silence before receiving a keepalive message.For a welcome message, this is the number of seconds that you have to subscribe to an event after receiving the welcome message. If you don’t subscribe to an event within this window, the socket is disconnected.
When
getStatus()
isEventSubSocketStatus.RECONNECTING
, this is set to null. -
getConnectedAt
The UTC date and time that the connection was created. -
getReconnectUrl
The URL to reconnect to if you get aSocketMessageType.SESSION_RECONNECT
message.Note:
TwitchEventSocket
automatically follows these reconnect URLs. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-