CommitPublisher
Hierarchy
- CommitPublisher
Index
Constructors
Properties
Methods
Constructors
constructor
+ new CommitPublisher(): CommitPublisher
Create a CommitPublisher Create a CommitPublisher
Returns: CommitPublisher
Properties
commandBus
• commandBus: CommandBus
Methods
getHandledCommandTypes
▸ getHandledCommandTypes(): TypeName[]
Returns all handleable command type names from command bus.
Returns: TypeName[]
List of handled command type names.
getHandledEventTypes
▸ getHandledEventTypes(): TypeName[]
Returns all handleable event type names from event bus.
Returns: TypeName[]
List of handled event type names.
isInProgress
▸ isInProgress(commitId
: string): boolean
Evaluates if commit is processed.
Parameters:
Name | Type | Description |
---|---|---|
commitId | string | Identifier for Commit . |
Returns: boolean
Returns true
if commit is being processed, else false
.
publishChanges
▸ publishChanges(commit
: Commit): Promise‹void›
Publishes changes from commit on application.
async
throws
{Error}
Thrown if there is any issue with handling published change(message).
Parameters:
Name | Type | Description |
---|---|---|
commit | Commit | Instance implementing Commit interface. |
Returns: Promise‹void›
startPublishing
▸ startPublishing(): Promise‹void›
Starts observing for changes in commits.
async
Returns: Promise‹void›
stopPublishing
▸ stopPublishing(): Promise‹void›
Stops observing for changes in commits.
async
Returns: Promise‹void›