@eveble/eveble
Hierarchy
Publisher
↳ EventBus
Implemented by
Index
Methods
- ensureHandleability
- getHandleableTypes
- getHandled
- getHandledTypes
- getHandledTypesNames
- getHandler
- getHandlerOrThrow
- getHandlers
- handle
- handles
- hasHandler
- initialize
- isHandleabe
- onPublish
- overrideHandler
- publish
- registerHandler
- removeHandler
- setHandleableTypes
- subscribeTo
- 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
onPublish
▸ onPublish(id
: string, hook
: Hook, shouldOverride?
: boolean): void
Parameters:
Name | Type |
---|---|
id | string |
hook | Hook |
shouldOverride? | boolean |
Returns: void
▸ onPublish(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
publish
▸ publish(event
: Event): Promise‹void›
Inherited from Publisher.publish
Overrides void
Parameters:
Name | Type |
---|---|
event | Event |
Returns: Promise‹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
setHandleableTypes
▸ setHandleableTypes(handleableTypes
: MessageType‹Message› | MessageType‹Message›[]): void
Inherited from Controller.setHandleableTypes
Overrides void
Parameters:
Name | Type |
---|---|
handleableTypes | MessageType‹Message› | MessageType‹Message›[] |
Returns: void
subscribeTo
▸ subscribeTo(event
: any, handler
: Handler, shouldOverride?
: boolean): void
Inherited from Publisher.subscribeTo
Overrides void
Parameters:
Name | Type |
---|---|
event | any |
handler | Handler |
shouldOverride? | boolean |
Returns: void
subscribes
▸ subscribes(): Map‹MessageType‹Event›, Handler›
Inherited from Controller.subscribes
Overrides void
Returns: Map‹MessageType‹Event›, Handler›