Class EventSubTransport
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionEventSubTransport
(@NotNull EventSubTransportMethod method, @Nullable String callback, @Nullable String secret, @Nullable String conduitId, @Nullable String sessionId, @Nullable Instant connectedAt, @Nullable Instant disconnectedAt) Creates a newEventSubTransport
instance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
protected boolean
boolean
@Nullable String
The callback URL where the notification should be sent.@Nullable String
An ID that identifies the conduit to send notifications to.@Nullable Instant
The UTC date and time that the WebSocket connection was established.@Nullable Instant
The UTC date and time that the WebSocket connection was lost.@NotNull EventSubTransportMethod
The transport method.@Nullable String
The secret used for verifying a webhook signature.@Nullable String
An ID that identifies the WebSocket that notifications are sent to.int
hashCode()
void
setSessionId
(@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 newEventSubTransport
instance.- 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
this
if 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.
-