@eveble/eveble
Hierarchy
↳ Sender
Sender
↳ CommandBus
Implemented by
Index
Methods
- ensureHandleability
- getHandleableTypes
- getHandled
- getHandledTypes
- getHandledTypesNames
- getHandler
- getHandlerOrThrow
- getHandlers
- handle
- handles
- hasHandler
- initialize
- isHandleabe
- onSend
- overrideHandler
- registerHandler
- removeHandler
- send
- setHandleableTypes
- subscribes
Methods
ensureHandleability
▸ ensureHandleability(messageType
: MessageType‹Message›, handleableTypes
: MessageType‹Message› | MessageType‹Message›[]): boolean
Inherited from Controller.ensureHandleability
Overrides void
Parameters:
Name | Type |
---|---|
messageType | MessageType‹Message› |
handleableTypes | MessageType‹Message› | MessageType‹Message›[] |
Returns: boolean
getHandleableTypes
▸ getHandleableTypes(): MessageType‹Message›[]
Inherited from Controller.getHandleableTypes
Overrides void
Returns: MessageType‹Message›[]
getHandled
▸ getHandled(messageType
: MessageType‹Message›): MessageType‹Message›[]
Inherited from Controller.getHandled
Overrides void
Parameters:
Name | Type |
---|---|
messageType | MessageType‹Message› |
Returns: MessageType‹Message›[]
getHandledTypes
▸ getHandledTypes(): MessageType‹Message›[]
Inherited from Controller.getHandledTypes
Overrides void
Returns: MessageType‹Message›[]
getHandledTypesNames
▸ getHandledTypesNames(): TypeName[]
Returns: TypeName[]
▸ getHandledTypesNames(): TypeName[]
Returns: TypeName[]
getHandler
▸ getHandler(messageType
: MessageType‹Message›): Handler | Handler[] | undefined
Inherited from Controller.getHandler
Overrides void
Parameters:
Name | Type |
---|---|
messageType | MessageType‹Message› |
Returns: Handler | Handler[] | undefined
getHandlerOrThrow
▸ getHandlerOrThrow(messageType
: MessageType‹Message›): Handler | Handler[]
Inherited from Controller.getHandlerOrThrow
Overrides void
Parameters:
Name | Type |
---|---|
messageType | MessageType‹Message› |
getHandlers
▸ getHandlers(): Map‹MessageType‹Message›, Handler | Handler[]›
Inherited from Controller.getHandlers
Overrides void
Returns: Map‹MessageType‹Message›, Handler | Handler[]›
handle
▸ handle(message
: Message, execution?
: Execution): Promise‹any›
Inherited from Controller.handle
Overrides void
Parameters:
Name | Type |
---|---|
message | Message |
execution? | Execution |
Returns: Promise‹any›
handles
▸ handles(): Map‹MessageType‹Command›, Handler›
Inherited from Controller.handles
Overrides void
Returns: Map‹MessageType‹Command›, Handler›
hasHandler
▸ hasHandler(messageType
: MessageType‹Message›): boolean
Inherited from Controller.hasHandler
Overrides void
Parameters:
Name | Type |
---|---|
messageType | MessageType‹Message› |
Returns: boolean
initialize
▸ initialize(): void
Inherited from Controller.initialize
Overrides void
Returns: void
isHandleabe
▸ isHandleabe(messageType
: MessageType‹Message›): boolean
Inherited from Controller.isHandleabe
Overrides void
Parameters:
Name | Type |
---|---|
messageType | MessageType‹Message› |
Returns: boolean
onSend
▸ onSend(id
: string, hook
: Hook, shouldOverride?
: boolean): void
Parameters:
Name | Type |
---|---|
id | string |
hook | Hook |
shouldOverride? | boolean |
Returns: void
▸ onSend(id
: string, hook
: Hook, shouldOverride?
: boolean): void
Parameters:
Name | Type |
---|---|
id | string |
hook | Hook |
shouldOverride? | boolean |
Returns: void
overrideHandler
▸ overrideHandler(messageType
: MessageType‹Message›, handler
: Handler): void
Inherited from Controller.overrideHandler
Overrides void
Parameters:
Name | Type |
---|---|
messageType | MessageType‹Message› |
handler | Handler |
Returns: void
registerHandler
▸ registerHandler(messageType
: MessageType‹Message›, handler
: Handler, shouldOverride?
: boolean): void
Inherited from Controller.registerHandler
Overrides void
Parameters:
Name | Type |
---|---|
messageType | MessageType‹Message› |
handler | Handler |
shouldOverride? | boolean |
Returns: void
removeHandler
▸ removeHandler(messageType
: MessageType‹Message›): void
Inherited from Controller.removeHandler
Overrides void
Parameters:
Name | Type |
---|---|
messageType | MessageType‹Message› |
Returns: void
send
▸ send(command
: Command): Promise‹any›
Overrides void
Parameters:
Name | Type |
---|---|
command | Command |
Returns: Promise‹any›
setHandleableTypes
▸ setHandleableTypes(handleableTypes
: MessageType‹Message› | MessageType‹Message›[]): void
Inherited from Controller.setHandleableTypes
Overrides void
Parameters:
Name | Type |
---|---|
handleableTypes | MessageType‹Message› | MessageType‹Message›[] |
Returns: void
subscribes
▸ subscribes(): Map‹MessageType‹Event›, Handler›
Inherited from Controller.subscribes
Overrides void
Returns: Map‹MessageType‹Event›, Handler›