AnswerQueue
An AnswerQueue stamp messages with unique ids and allow peers to answer to service calls
using the reply
and reject
helpers.
Constructor Summary
Public Constructor | ||
public |
Constructor |
Member Summary
Private Members | ||
private |
|
Method Summary
Public Methods | ||
public |
Resolve an answer by a reject |
|
public |
Resolve the answer to a message |
|
public |
Stamp a message and connect to a promise resolved with it answer |
Public Constructors
Private Members
private _waitingAnswers: * source
Public Methods
public reject(answerID: string, payload: *): void source
Resolve an answer by a reject
Params:
Name | Type | Attribute | Description |
answerID | string | The id of the answer to reject |
|
payload | * | The answer's content |
Return:
void |
public resolve(answerID: string, payload: *): void source
Resolve the answer to a message
Params:
Name | Type | Attribute | Description |
answerID | string | The id of the answer to resolve |
|
payload | * | The answer's content |
Return:
void |