Package discord4j.core.event.dispatch
Class DispatchContext<D>
- java.lang.Object
-
- discord4j.core.event.dispatch.DispatchContext<D>
-
- Type Parameters:
D
- The type of the payload.
public class DispatchContext<D> 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()
ShardInfo
getShardInfo()
StateHolder
getStateHolder()
static <D> DispatchContext<D>
of(D dispatch, GatewayDiscordClient gateway, StateHolder stateHolder, ShardInfo shardInfo)
-
-
-
Method Detail
-
of
public static <D> DispatchContext<D> of(D dispatch, GatewayDiscordClient gateway, StateHolder stateHolder, ShardInfo shardInfo)
-
getDispatch
public D getDispatch()
-
getGateway
public GatewayDiscordClient getGateway()
-
getStateHolder
public StateHolder getStateHolder()
-
getShardInfo
public ShardInfo getShardInfo()
-
-