More setup and an example componente
This commit is contained in:
@@ -2,10 +2,20 @@ import type { types } from "@aas-core-works/aas-core3.0rc02-typescript";
|
||||
|
||||
type ConnectionType = "ON_DEMAND" | "PERMANENT";
|
||||
|
||||
export abstract class InterfaceConnectionObject {
|
||||
public abstract readonly name: string;
|
||||
public abstract readonly connectionType: ConnectionType;
|
||||
public abstract readonly supportsSubscriptions: boolean;
|
||||
export type OnResponseCallback = (response: any) => void
|
||||
|
||||
export default abstract class InterfaceConnectionObject<ConfigInterface> {
|
||||
protected abstract readonly name: string;
|
||||
protected abstract readonly connectionType: ConnectionType;
|
||||
protected abstract readonly supportsSubscriptions: boolean;
|
||||
|
||||
protected config: ConfigInterface;
|
||||
private onResponseCallback: OnResponseCallback;
|
||||
|
||||
constructor(config: ConfigInterface, onResponseCallback: OnResponseCallback) {
|
||||
this.config = config;
|
||||
this.onResponseCallback = onResponseCallback;
|
||||
}
|
||||
|
||||
public abstract connect(): boolean;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user