Package discord4j.core.event.dispatch
Class DispatchContext<D,S>
- java.lang.Object
-
- discord4j.core.event.dispatch.DispatchContext<D,S>
-
- Type Parameters:
D
- the type of the payloadS
- the type of the old state
public class DispatchContext<D,S> extends Object
Represents gateway dispatch data enriched with context for processing through aDispatchHandler
defined underDispatchHandlers
.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description D
getDispatch()
GatewayDiscordClient
getGateway()
Optional<S>
getOldState()
ShardInfo
getShardInfo()
static <D,S>
DispatchContext<D,S>of(StatefulDispatch<D,S> statefulDispatch, GatewayDiscordClient gateway)
-
-
-
Method Detail
-
of
public static <D,S> DispatchContext<D,S> of(StatefulDispatch<D,S> statefulDispatch, GatewayDiscordClient gateway)
-
getGateway
public GatewayDiscordClient getGateway()
-
getDispatch
public D getDispatch()
-
getShardInfo
public ShardInfo getShardInfo()
-
-