Created
October 14, 2020 19:44
-
-
Save ljmotta/bced792e7e2778b7b2b4400c71ff6f1c to your computer and use it in GitHub Desktop.
PingPongEnvelopeApiImpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { EnvelopeApiFactoryArgs } from "@kogito-tooling/envelope"; | |
import { Association, PingPongChannelApi, PingPongEnvelopeApi, PingPongInitArgs } from "../api"; | |
// ... | |
export class PingPongEnvelopeApiImpl implements PingPongEnvelopeApi { | |
constructor( | |
private readonly args: EnvelopeApiFactoryArgs< | |
PingPongEnvelopeApi, | |
PingPongChannelApi, | |
PingPongEnvelopeViewApi, | |
PingPongEnvelopeContext | |
>, | |
private readonly pingPongViewFactory: PingPongFactory | |
) {} | |
public async pingPongView__init(association: Association, initArgs: PingPongInitArgs) { | |
this.args.envelopeBusController.associate(association.origin, association.envelopeServerId); | |
const pingPong = this.pingPongViewFactory.create(initArgs, this.args.envelopeBusController.manager.clientApi); | |
await this.args.view().setView(pingPong) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment