Package discord4j.core.event.dispatch
Class DispatchHandlers
java.lang.Object
discord4j.core.event.dispatch.DispatchHandlers
- All Implemented Interfaces:
DispatchEventMapper
Registry for
Dispatch
to Event
mapping operations.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionhandle
(DispatchContext<D, S> context) Process aDispatch
object wrapped with its context to potentially obtain anEvent
.
-
Constructor Details
-
DispatchHandlers
public DispatchHandlers()
-
-
Method Details
-
handle
Process aDispatch
object wrapped with its context to potentially obtain anEvent
.- Specified by:
handle
in interfaceDispatchEventMapper
- Type Parameters:
D
- the Dispatch typeS
- the old state type, if applicableE
- the resulting Event type- Parameters:
context
- the DispatchContext used with this Dispatch object- Returns:
- an Event mapped from the given Dispatch object, or null if no Event is produced.
-