Search
Preparing search index...
The search index is not available
ceb
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
ceb
@tmorin/ceb-messaging-moleculer
MoleculerCommandBus
Class MoleculerCommandBus
Implementation of the
CommandBus
for Moleculer.
Hierarchy
MoleculerCommandBus
Implements
CommandBus
Index
Constructors
constructor
Accessors
observer
Methods
dispose
execute
execute
And
Forget
handle
create
Service
publish
Events
Constructors
constructor
new
Moleculer
Command
Bus
(
eventBus
:
EventBus
, emitter
:
MoleculerEmitterCommandBus
, broker
:
ServiceBroker
, services
?:
Set
<
Service
<
ServiceSettingSchema
>
>
)
:
MoleculerCommandBus
Parameters
eventBus:
EventBus
emitter:
MoleculerEmitterCommandBus
broker:
ServiceBroker
services:
Set
<
Service
<
ServiceSettingSchema
>
>
= ...
Returns
MoleculerCommandBus
Accessors
observer
get
observer
(
)
:
MoleculerObservableCommandBus
Returns
MoleculerObservableCommandBus
Methods
dispose
dispose
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
execute
execute
<
R
,
C
>
(
command
:
C
, options
?:
Partial
<
MoleculerExecuteActionOptions
>
)
:
Promise
<
R
>
Type parameters
R
:
Result
<
any
,
ResultHeaders
,
R
>
=
Result
<
any
,
ResultHeaders
>
C
:
Command
<
any
,
MessageHeaders
,
C
>
=
Command
<
any
,
MessageHeaders
>
Parameters
command:
C
Optional
options:
Partial
<
MoleculerExecuteActionOptions
>
Returns
Promise
<
R
>
execute
And
Forget
execute
And
Forget
<
C
>
(
command
:
C
)
:
void
Type parameters
C
:
Command
<
any
,
MessageHeaders
,
C
>
=
Command
<
any
,
MessageHeaders
>
Parameters
command:
C
Returns
void
handle
handle
<
C
,
R
,
Es
>
(
commandType
:
string
, handler
:
CommandHandler
<
C
,
R
,
Es
>
)
:
Removable
Type parameters
C
:
Command
<
any
,
MessageHeaders
,
C
>
=
Command
<
any
,
MessageHeaders
>
R
:
Result
<
any
,
ResultHeaders
,
R
>
=
Result
<
any
,
ResultHeaders
>
Es
:
Event
<
any
,
MessageHeaders
>
[]
=
[
]
Parameters
commandType:
string
handler:
CommandHandler
<
C
,
R
,
Es
>
Returns
Removable
Static
Private
create
Service
create
Service
<
C
,
R
,
Es
>
(
commandType
:
string
, handler
:
CommandHandler
<
C
,
R
,
Es
>
, broker
:
ServiceBroker
, commandBus
:
CommandBus
, eventBus
:
EventBus
, emitter
:
MoleculerEmitterCommandBus
)
:
Service
<
ServiceSettingSchema
>
Type parameters
C
:
Command
<
any
,
MessageHeaders
,
C
>
=
Command
<
any
,
MessageHeaders
>
R
:
Result
<
any
,
ResultHeaders
,
R
>
=
Result
<
any
,
ResultHeaders
>
Es
:
Event
<
any
,
MessageHeaders
>
[]
=
[
]
Parameters
commandType:
string
handler:
CommandHandler
<
C
,
R
,
Es
>
broker:
ServiceBroker
commandBus:
CommandBus
eventBus:
EventBus
emitter:
MoleculerEmitterCommandBus
Returns
Service
<
ServiceSettingSchema
>
Static
Private
publish
Events
publish
Events
<
R
,
Es
>
(
eventBus
:
EventBus
, output
:
CommandHandlerOutputSync
<
R
,
Es
>
)
:
void
|
CommandResult
<
R
>
Type parameters
R
:
Result
<
any
,
ResultHeaders
,
R
>
Es
:
Event
<
any
,
MessageHeaders
>
[]
=
[
]
Parameters
eventBus:
EventBus
output:
CommandHandlerOutputSync
<
R
,
Es
>
Returns
void
|
CommandResult
<
R
>
Modules
@tmorin/ceb-
bundle-
web
@tmorin/ceb-
elements-
builders
@tmorin/ceb-
elements-
core
@tmorin/ceb-
elements-
testing
@tmorin/ceb-
inversion-
builder
@tmorin/ceb-
inversion-
core
@tmorin/ceb-
inversion-
testing-
core
@tmorin/ceb-
inversion-
testing-
jest
@tmorin/ceb-
inversion-
testing-
mocha
@tmorin/ceb-
messaging-
adapter-
dom
@tmorin/ceb-
messaging-
adapter-
electron
@tmorin/ceb-
messaging-
adapter-
purify
@tmorin/ceb-
messaging-
builder-
core
@tmorin/ceb-
messaging-
builder-
inversion
@tmorin/ceb-
messaging-
core
@tmorin/ceb-
messaging-
inversion
@tmorin/ceb-
messaging-
moleculer
@tmorin/ceb-
messaging-
moleculer-
inversion
@tmorin/ceb-
messaging-
simple
@tmorin/ceb-
messaging-
simple-
builder
@tmorin/ceb-
messaging-
simple-
inversion
@tmorin/ceb-
messaging-
testing
@tmorin/ceb-
templating-
builder
@tmorin/ceb-
templating-
engine
@tmorin/ceb-
templating-
literal
@tmorin/ceb-
templating-
parser
@tmorin/ceb-
utilities
Moleculer
Command
Bus
constructor
observer
dispose
execute
execute
And
Forget
handle
create
Service
publish
Events
Generated using
TypeDoc
Implementation of the CommandBus for Moleculer.