Service

Type parameters

T: SuperConstructor

T: SuperConstructor

Hierarchy

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

+ new Service(): Service

Inherited from HandlingMixin.constructor

Overrides HandlingMixin.constructor

Returns: Service

Properties

commandBus

commandBus: CommandBus

Overrides CommandHandlingMixin.commandBus


eventBus

eventBus: EventBus

Overrides EventHandlingMixin.eventBus

Methods

ensureHandleability

ensureHandleability(messageType: MessageTypeMessage›, handleableTypes?: MessageTypeMessage› | MessageTypeMessage›[]): boolean

Implementation of Publisher

Inherited from HandlingMixin.ensureHandleability

Overrides HandlingMixin.ensureHandleability

Parameters:

NameType
messageTypeMessageTypeMessage
handleableTypes?MessageTypeMessage› | MessageTypeMessage›[]

Returns: boolean


getHandleableTypes

getHandleableTypes(): MessageTypeMessage›[]

Implementation of Publisher

Inherited from HandlingMixin.getHandleableTypes

Overrides HandlingMixin.getHandleableTypes

Returns: MessageTypeMessage›[]


getHandled

getHandled(messageType: MessageTypeMessage›): MessageTypeMessage›[]

Implementation of Publisher

Inherited from HandlingMixin.getHandled

Overrides HandlingMixin.getHandled

Parameters:

NameType
messageTypeMessageTypeMessage

Returns: MessageTypeMessage›[]


getHandledCommands

getHandledCommands(): MessageTypeCommand›[]

Inherited from HandlingMixin.getHandledCommands

Overrides HandlingMixin.getHandledCommands

Returns: MessageTypeCommand›[]


getHandledEvents

getHandledEvents(): MessageTypeEvent›[]

Inherited from HandlingMixin.getHandledEvents

Overrides HandlingMixin.getHandledEvents

Returns: MessageTypeEvent›[]


getHandledMessages

getHandledMessages(): MessageTypeMessage›[]

Inherited from HandlingMixin.getHandledMessages

Overrides HandlingMixin.getHandledMessages

Returns: MessageTypeMessage›[]


getHandledTypes

getHandledTypes(): MessageTypeMessage›[]

Implementation of Publisher

Inherited from HandlingMixin.getHandledTypes

Overrides HandlingMixin.getHandledTypes

Returns: MessageTypeMessage›[]


getHandledTypesNames

getHandledTypesNames(): TypeName[]

Inherited from HandlingMixin.getHandledTypesNames

Overrides HandlingMixin.getHandledTypesNames

Returns: TypeName[]


getHandler

getHandler(messageType: MessageTypeMessage›): Handler | undefined

Implementation of Publisher

Inherited from OneToOneHandlingMixin.getHandler

Overrides OneToManyHandlingMixin.getHandler

Parameters:

NameType
messageTypeMessageTypeMessage

Returns: Handler | undefined


getHandlerOrThrow

getHandlerOrThrow(messageType: MessageTypeMessage›): Handler

Implementation of Publisher

Inherited from OneToOneHandlingMixin.getHandlerOrThrow

Overrides OneToManyHandlingMixin.getHandlerOrThrow

Parameters:

NameType
messageTypeMessageTypeMessage

Returns: Handler


getHandlers

getHandlers(): Map‹MessageTypeMessage›, Handler | Handler[]›

Implementation of Publisher

Inherited from HandlingMixin.getHandlers

Overrides HandlingMixin.getHandlers

Returns: Map‹MessageTypeMessage›, Handler | Handler[]›


getSubscribedEvents

getSubscribedEvents(): MessageTypeEvent›[]

Inherited from EventHandlingMixin.getSubscribedEvents

Overrides void

Returns: MessageTypeEvent›[]


getTypeByHandler

getTypeByHandler(handlerReference: Handler): any | undefined

Inherited from OneToOneHandlingMixin.getTypeByHandler

Overrides OneToManyHandlingMixin.getTypeByHandler

Parameters:

NameType
handlerReferenceHandler

Returns: any | undefined


handle

handle(message: Message): Promise‹any›

Inherited from OneToOneHandlingMixin.handle

Overrides OneToManyHandlingMixin.handle

Parameters:

NameType
messageMessage

Returns: Promise‹any›


handles

handles(): Map‹MessageTypeCommand›, Handler

Implementation of Publisher

Inherited from HandlingMixin.handles

Overrides HandlingMixin.handles

Returns: Map‹MessageTypeCommand›, Handler


hasHandler

hasHandler(messageType: MessageTypeMessage›): boolean

Implementation of Publisher

Inherited from HandlingMixin.hasHandler

Overrides HandlingMixin.hasHandler

Parameters:

NameType
messageTypeMessageTypeMessage

Returns: boolean


initialize

initialize(): void

Implementation of Publisher

Overrides CommandHandlingMixin.initialize

Initializes Service.

Returns: void


isHandleabe

isHandleabe(messageType: MessageTypeMessage›, handleableTypes?: MessageTypeMessage› | MessageTypeMessage›[]): boolean

Inherited from HandlingMixin.isHandleabe

Overrides HandlingMixin.isHandleabe

Parameters:

NameType
messageTypeMessageTypeMessage
handleableTypes?MessageTypeMessage› | MessageTypeMessage›[]

Returns: boolean


on

on(event: Event): Promise‹void›

Inherited from EventHandlingMixin.on

Overrides void

Parameters:

NameType
eventEvent

Returns: Promise‹void›


overrideHandler

overrideHandler(messageType: MessageTypeMessage›, handler: Handler): void

Implementation of Publisher

Inherited from HandlingMixin.overrideHandler

Overrides HandlingMixin.overrideHandler

Parameters:

NameType
messageTypeMessageTypeMessage
handlerHandler

Returns: void


publish

publish(event: Event): Promise‹void›

Implementation of Publisher

Inherited from EventHandlingMixin.publish

Overrides void

Parameters:

NameType
eventEvent

Returns: Promise‹void›


registerCommandHandler

registerCommandHandler(commandType: MessageTypeCommand›, handler: Handler, shouldOverride?: boolean): void

Inherited from CommandHandlingMixin.registerCommandHandler

Overrides void

Parameters:

NameType
commandTypeMessageTypeCommand
handlerHandler
shouldOverride?boolean

Returns: void


registerEventHandler

registerEventHandler(eventType: MessageTypeEvent›, handler: Handler, shouldOverride?: boolean): void

Inherited from EventHandlingMixin.registerEventHandler

Overrides void

Parameters:

NameType
eventTypeMessageTypeEvent
handlerHandler
shouldOverride?boolean

Returns: void


registerHandler

registerHandler(messageType: MessageTypeMessage›, handler: Handler, shouldOverride?: boolean): void

Implementation of Publisher

Inherited from OneToOneHandlingMixin.registerHandler

Overrides HandlingMixin.registerHandler

Parameters:

NameType
messageTypeMessageTypeMessage
handlerHandler
shouldOverride?boolean

Returns: void


removeHandler

removeHandler(messageType: MessageTypeMessage›): void

Implementation of Publisher

Inherited from HandlingMixin.removeHandler

Overrides HandlingMixin.removeHandler

Parameters:

NameType
messageTypeMessageTypeMessage

Returns: void


send

send(command: Command): Promise‹any›

Implementation of Sender

Inherited from CommandHandlingMixin.send

Overrides void

Parameters:

NameType
commandCommand

Returns: Promise‹any›


setHandleableTypes

setHandleableTypes(handleableTypes: MessageTypeMessage› | MessageTypeMessage›[]): void

Implementation of Publisher

Inherited from HandlingMixin.setHandleableTypes

Overrides HandlingMixin.setHandleableTypes

Parameters:

NameType
handleableTypesMessageTypeMessage› | MessageTypeMessage›[]

Returns: void


subscribeTo

subscribeTo(eventType: MessageTypeEvent›, handler: Handler, shouldOverride?: boolean): void

Inherited from EventHandlingMixin.subscribeTo

Overrides void

Parameters:

NameType
eventTypeMessageTypeEvent
handlerHandler
shouldOverride?boolean

Returns: void


subscribes

subscribes(): Map‹MessageTypeEvent›, Handler

Implementation of Publisher

Inherited from HandlingMixin.subscribes

Overrides HandlingMixin.subscribes

Returns: Map‹MessageTypeEvent›, Handler