Package discord4j.core.event.dispatch
Class DispatchHandlers
- java.lang.Object
-
- discord4j.core.event.dispatch.DispatchHandlers
-
- All Implemented Interfaces:
DispatchEventMapper
public class DispatchHandlers extends Object implements DispatchEventMapper
Registry forDispatch
toEvent
mapping operations.
-
-
Constructor Summary
Constructors Constructor Description DispatchHandlers()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <D,S,E extends Event>
Mono<E>handle(DispatchContext<D,S> context)
Process aDispatch
object wrapped with its context to potentially obtain anEvent
.
-
-
-
Method Detail
-
handle
public <D,S,E extends Event> Mono<E> handle(DispatchContext<D,S> context)
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.
-
-