Class EventSubSocketInformation

java.lang.Object
com.github.twitch4j.eventsub.socket.domain.EventSubSocketInformation

public class EventSubSocketInformation extends Object
  • Constructor Details

    • EventSubSocketInformation

      public EventSubSocketInformation()
  • Method Details

    • getId

      public String getId()
      An ID that uniquely identifies this WebSocket connection.

      Use this ID to set the session_id field in all subscription requests.

    • getStatus

      public EventSubSocketStatus getStatus()
      The connection’s status.

      Upon SocketMessageType.SESSION_WELCOME, this will be set to EventSubSocketStatus.CONNECTED.

    • getKeepaliveTimeoutSeconds

      @Nullable public @Nullable Integer 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() is EventSubSocketStatus.RECONNECTING, this is set to null.

    • getConnectedAt

      public Instant getConnectedAt()
      The UTC date and time that the connection was created.
    • getReconnectUrl

      @Nullable public @Nullable String getReconnectUrl()
      The URL to reconnect to if you get a SocketMessageType.SESSION_RECONNECT message.

      Note: TwitchEventSocket automatically follows these reconnect URLs.

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object