public class GatewayStateChange extends Object implements discord4j.discordjson.json.gateway.Dispatch
| Modifier and Type | Class and Description |
|---|---|
static class |
GatewayStateChange.State |
| Modifier | Constructor and Description |
|---|---|
protected |
GatewayStateChange(GatewayStateChange.State state,
long currentAttempt,
Duration backoff) |
| Modifier and Type | Method and Description |
|---|---|
static GatewayStateChange |
connected() |
static ClosingStateChange |
disconnected(DisconnectBehavior behavior,
CloseStatus status) |
static GatewayStateChange |
disconnectedResume() |
Duration |
getBackoff() |
long |
getCurrentAttempt() |
GatewayStateChange.State |
getState() |
static GatewayStateChange |
retryFailed(long currentAttempt,
Duration nextAttemptBackoff) |
static GatewayStateChange |
retryStarted(Duration nextAttemptBackoff) |
static GatewayStateChange |
retryStartedResume(Duration nextAttemptBackoff) |
static GatewayStateChange |
retrySucceeded(long currentAttempt) |
String |
toString() |
protected GatewayStateChange(GatewayStateChange.State state, long currentAttempt, @Nullable Duration backoff)
public static GatewayStateChange connected()
public static ClosingStateChange disconnected(DisconnectBehavior behavior, CloseStatus status)
public static GatewayStateChange disconnectedResume()
public static GatewayStateChange retryStarted(Duration nextAttemptBackoff)
public static GatewayStateChange retryStartedResume(Duration nextAttemptBackoff)
public static GatewayStateChange retrySucceeded(long currentAttempt)
public static GatewayStateChange retryFailed(long currentAttempt, Duration nextAttemptBackoff)
public GatewayStateChange.State getState()
public long getCurrentAttempt()