sync/src/legacymodule.js

29 lines
588 B
JavaScript
Raw Normal View History

2016-02-05 05:43:20 +00:00
import NullClusterClient from './io/cluster/nullclusterclient';
2016-02-10 07:04:07 +00:00
import Config from './config';
import IOConfiguration from './configuration/ioconfig';
2017-08-16 01:23:03 +00:00
import { EventEmitter } from 'events';
2016-02-05 05:43:20 +00:00
class LegacyModule {
2016-02-10 07:04:07 +00:00
getIOConfig() {
if (!this.ioConfig) {
this.ioConfig = IOConfiguration.fromOldConfig(Config);
}
return this.ioConfig;
}
2016-02-05 05:43:20 +00:00
getClusterClient() {
2016-02-10 07:04:07 +00:00
return new NullClusterClient(this.getIOConfig());
2016-02-05 05:43:20 +00:00
}
2017-08-16 01:23:03 +00:00
getGlobalMessageBus() {
return new EventEmitter();
}
2016-02-05 05:43:20 +00:00
onReady() {
2016-02-10 07:04:07 +00:00
2016-02-05 05:43:20 +00:00
}
}
export { LegacyModule };