2018-03-07 09:48:32 +01:00
|
|
|
import Stream from './stream';
|
|
|
|
import StreamManager from './stream-manager';
|
2018-04-29 14:37:51 +02:00
|
|
|
import MiOS from '../../../mios';
|
2018-03-07 09:48:32 +01:00
|
|
|
|
|
|
|
/**
|
2018-06-08 21:14:26 +02:00
|
|
|
* Notes stats stream connection
|
2018-03-07 09:48:32 +01:00
|
|
|
*/
|
2018-06-08 21:14:26 +02:00
|
|
|
export class NotesStatsStream extends Stream {
|
2018-03-15 11:53:46 +01:00
|
|
|
constructor(os: MiOS) {
|
2018-06-08 21:14:26 +02:00
|
|
|
super(os, 'notes-stats');
|
2018-03-07 09:48:32 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-06-08 21:14:26 +02:00
|
|
|
export class NotesStatsStreamManager extends StreamManager<NotesStatsStream> {
|
2018-03-15 11:53:46 +01:00
|
|
|
private os: MiOS;
|
|
|
|
|
|
|
|
constructor(os: MiOS) {
|
|
|
|
super();
|
|
|
|
|
|
|
|
this.os = os;
|
|
|
|
}
|
|
|
|
|
2018-03-07 09:48:32 +01:00
|
|
|
public getConnection() {
|
|
|
|
if (this.connection == null) {
|
2018-06-08 21:14:26 +02:00
|
|
|
this.connection = new NotesStatsStream(this.os);
|
2018-03-07 09:48:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return this.connection;
|
|
|
|
}
|
|
|
|
}
|