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 forDispatchtoEventmapping 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 aDispatchobject 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 aDispatchobject wrapped with its context to potentially obtain anEvent.- Specified by:
handlein 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.
-
-