TxMountPoint
// get a new mount-point under the name 'GITHUB::GIST::C2' and save on the registry
mountpoint = TxMountPointRegistry.instance.create('GITHUB::GIST::C2'); // get a new mount-point under the name 'GITHUB::GIST::C2' and save on the registry
mountpoint = TxMountPointRegistry.instance.create(Symbol('GITHUB::GIST::C2');class Names {
static GITHUB_GIST_C1 = Symbol('GITHUB_GIST_C1');
static GITHUB_GIST_C2 = Symbol('GITHUB_GIST_C2');
}
mountpoint = TxMountPointRegistry.instance.create(Names.GITHUB_GIST_C1);class C1Component { mountpoint = TxMountPointRegistry.instance.create('GITHUB::GIST::C1'); task: any; constructor() { this.mountpoint.tasks().subscribe( (task) => { logger.info('[C1Component:task] got task = ' + JSON.stringify(task, undefined, 2)); this.task = task; // C1 got a task send reply to who ever was that mountpoint.reply().next(new TxTask('get', '', task['data'])); } ) } . .
Last updated