Class: RedirectDispatcher<IncomingEventType, OutgoingResponseType>
Class: RedirectDispatcher<IncomingEventType, OutgoingResponseType>
RedirectDispatcher
A callable dispatcher for dispatching function-based event handlers.
Type Parameters
IncomingEventType
IncomingEventType
extends IIncomingEvent
OutgoingResponseType
OutgoingResponseType
= unknown
Implements
IDispacher
<IncomingEventType
,OutgoingResponseType
>
Constructors
Constructor
new RedirectDispatcher<IncomingEventType, OutgoingResponseType>(): RedirectDispatcher<IncomingEventType, OutgoingResponseType>;
Returns
RedirectDispatcher
<IncomingEventType
, OutgoingResponseType
>
Methods
dispatch()
dispatch(context): Promise<OutgoingResponseType>;
Dispatch the event to the handler
Parameters
context
DispatcherContext
<IncomingEventType
, OutgoingResponseType
>
The dispatcher context
Returns
Promise
<OutgoingResponseType
>
The outgoing response
Throws
If the action is not found in the handler
Implementation of
getName()
getName(_route): string;
Get the name of the handler
Parameters
_route
Route
<IncomingEventType
, OutgoingResponseType
>
The route
Returns
string
The name of the handler