@mindignited/continuum-client 2.14.7 → 3.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -31,7 +31,7 @@ export declare class ContinuumSingleton {
31
31
  /**
32
32
  * The {@link IEventBus} that is used to communicate with the Continuum server
33
33
  */
34
- readonly eventBus: IEventBus;
34
+ private _eventBus;
35
35
  /**
36
36
  * The {@link ServiceRegistry} that is used to manage the services that are available
37
37
  */
@@ -41,6 +41,8 @@ export declare class ContinuumSingleton {
41
41
  */
42
42
  readonly crudServiceProxyFactory: CrudServiceProxyFactory;
43
43
  constructor();
44
+ get eventBus(): IEventBus;
45
+ set eventBus(eventBus: IEventBus);
44
46
  /**
45
47
  * Requests a connection to the given Stomp url
46
48
  * @param connectionInfo provides the information needed to connect to the continuum server
@@ -39,6 +39,7 @@ export declare class EventBus implements IEventBus {
39
39
  send(event: IEvent): void;
40
40
  request(event: IEvent): Promise<IEvent>;
41
41
  requestStream(event: IEvent, sendControlEvents?: boolean): Observable<IEvent>;
42
+ listen(_serverInfo: ServerInfo): Promise<void>;
42
43
  observe(cri: string): Observable<IEvent>;
43
44
  private cleanup;
44
45
  /**
@@ -104,6 +104,12 @@ export interface IEventBus {
104
104
  * @return true if the connection is active false if not
105
105
  */
106
106
  isConnectionActive(): boolean;
107
+ /**
108
+ * Starts a local event bus server to listen for incoming connections
109
+ * NOTE: Not all implementations will support this
110
+ * @param serverInfo to listen on
111
+ */
112
+ listen(serverInfo: ServerInfo): Promise<void>;
107
113
  /**
108
114
  * Creates a subscription for all {@link IEvent}'s for the given destination
109
115
  * @param cri to subscribe to
@@ -18,10 +18,13 @@ export declare class TextEventFactory implements IEventFactory {
18
18
  * The default implementation of {@link IServiceRegistry}
19
19
  */
20
20
  export declare class ServiceRegistry implements IServiceRegistry {
21
- private readonly eventBus;
22
- private readonly supervisors;
21
+ private _eventBus;
22
+ private supervisors;
23
23
  private contextInterceptor;
24
+ private debugLogger;
24
25
  constructor(eventBus: IEventBus);
26
+ set eventBus(eventBus: IEventBus);
27
+ get eventBus(): IEventBus;
25
28
  serviceProxy(serviceIdentifier: string): IServiceProxy;
26
29
  register(serviceIdentifier: ServiceIdentifier, service: any): void;
27
30
  unRegister(serviceIdentifier: ServiceIdentifier): void;
@@ -13,7 +13,7 @@ import { ContextInterceptor } from '../../../core/api/ContextInterceptor.js';
13
13
  export declare class ServiceInvocationSupervisor {
14
14
  private readonly log;
15
15
  private active;
16
- private readonly eventBusService;
16
+ private _eventBus;
17
17
  private readonly interceptorProvider;
18
18
  private readonly argumentResolver;
19
19
  private readonly returnValueConverter;
@@ -27,6 +27,12 @@ export declare class ServiceInvocationSupervisor {
27
27
  returnValueConverter?: ReturnValueConverter;
28
28
  });
29
29
  isActive(): boolean;
30
+ /**
31
+ * The {@link IEventBus} that this supervisor uses to listen for service invocation events
32
+ * This can be changed at runtime, the supervisor will restart to use the new event bus
33
+ * @param eventBus the new IEventBus to use
34
+ */
35
+ set eventBus(eventBus: IEventBus);
30
36
  start(): void;
31
37
  stop(): void;
32
38
  private buildMethodMap;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindignited/continuum-client",
3
- "version": "2.14.7",
3
+ "version": "3.0.0-beta.1",
4
4
  "author": "Mind Ignited <develop@mindignited.com>",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",