Adds documentations for adapters and main constructors (#4951)

* wip

* Adds documentations for adapters, and constructors

* nits

* nit
This commit is contained in:
Florent Vilmart
2018-08-10 15:51:31 -04:00
parent 0571675fcd
commit 942b9b5b1a
17 changed files with 3316 additions and 2708 deletions

View File

@@ -0,0 +1,49 @@
/*eslint no-unused-vars: "off"*/
/**
* @module Adapters
*/
/**
* @interface PubSubAdapter
*/
export class PubSubAdapter {
/**
* @returns {PubSubAdapter.Publisher}
*/
static createPublisher() {}
/**
* @returns {PubSubAdapter.Subscriber}
*/
static createSubscriber() {}
}
/**
* @interface Publisher
* @memberof PubSubAdapter
*/
interface Publisher {
/**
* @param {String} channel the channel in which to publish
* @param {String} message the message to publish
*/
publish(channel: string, message: string):void;
}
/**
* @interface Subscriber
* @memberof PubSubAdapter
*/
interface Subscriber {
/**
* called when a new subscription the channel is required
* @param {String} channel the channel to subscribe
*/
subscribe(channel: string): void;
/**
* called when the subscription from the channel should be stopped
* @param {String} channel
*/
unsubscribe(channel: string): void;
}
export default PubSubAdapter;