CommandSchedulingService

Type parameters

T: SuperConstructor

T: SuperConstructor

Hierarchy

Service

  • Service

    CommandSchedulingService

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

+ new CommandSchedulingService(): CommandSchedulingService

Inherited from HandlingMixin.constructor

Overrides void

Returns: CommandSchedulingService

Properties

commandBus

commandBus: CommandBus

Overrides Service.commandBus


eventBus

eventBus: EventBus

Overrides Service.eventBus

Methods

ScheduleCommand

ScheduleCommand(scheduleCommand: ScheduleCommand): Promise‹void›

Handles scheduling delayed commands with scheduler or sends command immediately if its deliverable.

async

Parameters:

NameTypeDescription
scheduleCommandScheduleCommandInstance of ScheduleCommand.

Returns: Promise‹void›


UnscheduleCommand

UnscheduleCommand(unscheduleCommand: UnscheduleCommand): Promise‹void›

Unschedules command from scheduler.

async

Parameters:

NameTypeDescription
unscheduleCommandUnscheduleCommandInstance of UnscheduleCommand.

Returns: Promise‹void›


ensureHandleability

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

Implementation of Publisher

Inherited from HandlingMixin.ensureHandleability

Overrides CancelingEmployment.ensureHandleability

Parameters:

NameType
messageTypeMessageTypeMessage
handleableTypes?MessageTypeMessage› | MessageTypeMessage›[]

Returns: boolean


getHandleableTypes

getHandleableTypes(): MessageTypeMessage›[]

Implementation of Publisher

Inherited from HandlingMixin.getHandleableTypes

Overrides CancelingEmployment.getHandleableTypes

Returns: MessageTypeMessage›[]


getHandled

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

Implementation of Publisher

Inherited from HandlingMixin.getHandled

Overrides CancelingEmployment.getHandled

Parameters:

NameType
messageTypeMessageTypeMessage

Returns: MessageTypeMessage›[]


getHandledCommands

getHandledCommands(): MessageTypeCommand›[]

Inherited from HandlingMixin.getHandledCommands

Overrides CancelingEmployment.getHandledCommands

Returns: MessageTypeCommand›[]


getHandledEvents

getHandledEvents(): MessageTypeEvent›[]

Inherited from HandlingMixin.getHandledEvents

Overrides CancelingEmployment.getHandledEvents

Returns: MessageTypeEvent›[]


getHandledMessages

getHandledMessages(): MessageTypeMessage›[]

Inherited from HandlingMixin.getHandledMessages

Overrides CancelingEmployment.getHandledMessages

Returns: MessageTypeMessage›[]


getHandledTypes

getHandledTypes(): MessageTypeMessage›[]

Implementation of Publisher

Inherited from HandlingMixin.getHandledTypes

Overrides CancelingEmployment.getHandledTypes

Returns: MessageTypeMessage›[]


getHandledTypesNames

getHandledTypesNames(): TypeName[]

Inherited from HandlingMixin.getHandledTypesNames

Overrides CancelingEmployment.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 CancelingEmployment.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 CancelingEmployment.handles

Returns: Map‹MessageTypeCommand›, Handler


hasHandler

hasHandler(messageType: MessageTypeMessage›): boolean

Implementation of Publisher

Inherited from HandlingMixin.hasHandler

Overrides CancelingEmployment.hasHandler

Parameters:

NameType
messageTypeMessageTypeMessage

Returns: boolean


initialize

initialize(): void

Implementation of Publisher

Inherited from Service.initialize

Overrides CommandHandlingMixin.initialize

Returns: void


isHandleabe

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

Inherited from HandlingMixin.isHandleabe

Overrides CancelingEmployment.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 CancelingEmployment.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 CancelingEmployment.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 CancelingEmployment.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 CancelingEmployment.subscribes

Returns: Map‹MessageTypeEvent›, Handler