Class EventSubTransport
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionEventSubTransport(@NotNull EventSubTransportMethod method, @Nullable String callback, @Nullable String secret, @Nullable String conduitId, @Nullable String sessionId, @Nullable Instant connectedAt, @Nullable Instant disconnectedAt) Creates a newEventSubTransportinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()protected booleanboolean@Nullable StringThe callback URL where the notification should be sent.@Nullable StringAn ID that identifies the conduit to send notifications to.@Nullable InstantThe UTC date and time that the WebSocket connection was established.@Nullable InstantThe UTC date and time that the WebSocket connection was lost.@NotNull EventSubTransportMethodThe transport method.@Nullable StringThe secret used for verifying a webhook signature.@Nullable StringAn ID that identifies the WebSocket that notifications are sent to.inthashCode()voidsetSessionId(@Nullable String sessionId) Deprecated.toString()withSessionId(@Nullable String sessionId) An ID that identifies the WebSocket that notifications are sent to.
-
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) Creates a newEventSubTransportinstance.- Parameters:
method- The transport method.callback- The callback URL where the notification should be sent.Specify this field only if method is set to webhook.
secret- 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.
conduitId- 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.
sessionId- An ID that identifies the WebSocket that notifications are sent to.Specify this field only if method is set to websocket.
connectedAt- The UTC date and time that the WebSocket connection was established.Included only if method is set to websocket.
disconnectedAt- The UTC date and time that the WebSocket connection was lost.Included only if method is set to websocket.
-
-
Method Details
-
builder
-
getMethod
The transport method. -
getCallback
The callback URL where the notification should be sent.Specify this field only if method is set to webhook.
-
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
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
An ID that identifies the WebSocket that notifications are sent to.Specify this field only if method is set to websocket.
-
getConnectedAt
The UTC date and time that the WebSocket connection was established.Included only if method is set to websocket.
-
getDisconnectedAt
The UTC date and time that the WebSocket connection was lost.Included only if method is set to websocket.
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
withSessionId
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
thisif an identical value is passed).
-
setSessionId
Deprecated.An ID that identifies the WebSocket that notifications are sent to.Specify this field only if method is set to websocket.
-