Class EventSubTransport

java.lang.Object
com.github.twitch4j.eventsub.EventSubTransport

public class EventSubTransport extends Object
  • Constructor Details

    • EventSubTransport

      public EventSubTransport()
    • EventSubTransport

      public EventSubTransport(@NotNull @NotNull EventSubTransportMethod method, @Nullable @Nullable String callback, @Nullable @Nullable String secret, @Nullable @Nullable String conduitId, @Nullable @Nullable String sessionId, @Nullable @Nullable Instant connectedAt, @Nullable @Nullable Instant disconnectedAt)
  • Method Details

    • builder

    • getMethod

      @NotNull public @NotNull EventSubTransportMethod getMethod()
      The transport method.
    • getCallback

      @Nullable public @Nullable String getCallback()
      The callback URL where the notification should be sent.

      Specify this field only if method is set to webhook.

    • getSecret

      @Nullable public @Nullable String getSecret()
      The secret used for verifying a webhook signature.

      The secret must be an ASCII string that’s a minimum of 10 characters long and a maximum of 100 characters long.

      Specify this field only if method is set to webhook.

    • getConduitId

      @Nullable public @Nullable String getConduitId()
      An ID that identifies the conduit to send notifications to.

      When you create a conduit, the server returns the conduit ID.

      Specify this field only if method is set to conduit.

    • getSessionId

      @Nullable public @Nullable String getSessionId()
      An ID that identifies the WebSocket that notifications are sent to.

      Specify this field only if method is set to websocket.

    • getConnectedAt

      @Nullable public @Nullable Instant getConnectedAt()
      The UTC date and time that the WebSocket connection was established.

      Included only if method is set to websocket.

    • getDisconnectedAt

      @Nullable public @Nullable Instant getDisconnectedAt()
      The UTC date and time that the WebSocket connection was lost.

      Included only if method is set to websocket.

    • 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
    • withSessionId

      public EventSubTransport withSessionId(@Nullable @Nullable String sessionId)
      An ID that identifies the WebSocket that notifications are sent to.

      Specify this field only if method is set to websocket.

      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • setSessionId

      @Deprecated @Internal public void setSessionId(@Nullable @Nullable String sessionId)
      Deprecated.
      An ID that identifies the WebSocket that notifications are sent to.

      Specify this field only if method is set to websocket.