Package discord4j.gateway.retry
Class GatewayStateChange
- java.lang.Object
-
- discord4j.gateway.retry.GatewayStateChange
-
- All Implemented Interfaces:
discord4j.discordjson.json.gateway.Dispatch,discord4j.discordjson.json.gateway.PayloadData
- Direct Known Subclasses:
ClosingStateChange
public class GatewayStateChange extends Object implements discord4j.discordjson.json.gateway.Dispatch
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGatewayStateChange.State
-
Constructor Summary
Constructors Modifier Constructor Description protectedGatewayStateChange(GatewayStateChange.State state, long currentAttempt, Duration backoff)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GatewayStateChangeconnected()static ClosingStateChangedisconnected(DisconnectBehavior behavior, CloseStatus status)static GatewayStateChangedisconnectedResume()DurationgetBackoff()longgetCurrentAttempt()GatewayStateChange.StategetState()static GatewayStateChangeretryFailed(long currentAttempt, Duration nextAttemptBackoff)static GatewayStateChangeretryStarted(Duration nextAttemptBackoff)static GatewayStateChangeretryStartedResume(Duration nextAttemptBackoff)static GatewayStateChangeretrySucceeded(long currentAttempt)static GatewayStateChangesessionInvalidated()StringtoString()
-
-
-
Constructor Detail
-
GatewayStateChange
protected GatewayStateChange(GatewayStateChange.State state, long currentAttempt, @Nullable Duration backoff)
-
-
Method Detail
-
connected
public static GatewayStateChange connected()
-
disconnected
public static ClosingStateChange disconnected(DisconnectBehavior behavior, CloseStatus status)
-
disconnectedResume
public static GatewayStateChange disconnectedResume()
-
retryStarted
public static GatewayStateChange retryStarted(Duration nextAttemptBackoff)
-
retryStartedResume
public static GatewayStateChange retryStartedResume(Duration nextAttemptBackoff)
-
retrySucceeded
public static GatewayStateChange retrySucceeded(long currentAttempt)
-
retryFailed
public static GatewayStateChange retryFailed(long currentAttempt, Duration nextAttemptBackoff)
-
sessionInvalidated
public static GatewayStateChange sessionInvalidated()
-
getState
public GatewayStateChange.State getState()
-
getCurrentAttempt
public long getCurrentAttempt()
-
-