Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
PingPongEnvelopeApiImpl
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
You can’t perform that action at this time.