node-opcua-server 2.64.1 → 2.66.0

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.
Files changed (58) hide show
  1. package/dist/base_server.d.ts +110 -110
  2. package/dist/base_server.js +473 -473
  3. package/dist/factory.d.ts +12 -12
  4. package/dist/factory.js +23 -23
  5. package/dist/history_server_capabilities.d.ts +35 -35
  6. package/dist/history_server_capabilities.js +43 -43
  7. package/dist/i_channel_data.d.ts +13 -13
  8. package/dist/i_channel_data.js +2 -2
  9. package/dist/i_register_server_manager.d.ts +16 -16
  10. package/dist/i_register_server_manager.js +2 -2
  11. package/dist/i_server_side_publish_engine.d.ts +36 -36
  12. package/dist/i_server_side_publish_engine.js +49 -49
  13. package/dist/i_socket_data.d.ts +11 -11
  14. package/dist/i_socket_data.js +2 -2
  15. package/dist/index.d.ts +14 -14
  16. package/dist/index.js +30 -26
  17. package/dist/index.js.map +1 -1
  18. package/dist/monitored_item.d.ts +176 -176
  19. package/dist/monitored_item.js +998 -998
  20. package/dist/node_sampler.d.ts +3 -3
  21. package/dist/node_sampler.js +75 -75
  22. package/dist/opcua_server.d.ts +654 -654
  23. package/dist/opcua_server.js +2389 -2389
  24. package/dist/opcua_server.js.map +1 -1
  25. package/dist/queue.d.ts +11 -11
  26. package/dist/queue.js +71 -71
  27. package/dist/register_server_manager.d.ts +95 -95
  28. package/dist/register_server_manager.js +584 -584
  29. package/dist/register_server_manager_hidden.d.ts +17 -17
  30. package/dist/register_server_manager_hidden.js +27 -27
  31. package/dist/register_server_manager_mdns_only.d.ts +22 -22
  32. package/dist/register_server_manager_mdns_only.js +57 -57
  33. package/dist/server_capabilities.d.ts +61 -61
  34. package/dist/server_capabilities.js +108 -108
  35. package/dist/server_end_point.d.ts +183 -183
  36. package/dist/server_end_point.js +816 -816
  37. package/dist/server_engine.d.ts +315 -315
  38. package/dist/server_engine.js +1678 -1678
  39. package/dist/server_publish_engine.d.ts +112 -112
  40. package/dist/server_publish_engine.js +530 -530
  41. package/dist/server_publish_engine_for_orphan_subscriptions.d.ts +16 -16
  42. package/dist/server_publish_engine_for_orphan_subscriptions.js +49 -49
  43. package/dist/server_session.d.ts +180 -180
  44. package/dist/server_session.js +737 -737
  45. package/dist/server_subscription.d.ts +395 -395
  46. package/dist/server_subscription.js +1316 -1316
  47. package/dist/sessions_compatible_for_transfer.d.ts +2 -2
  48. package/dist/sessions_compatible_for_transfer.js +36 -36
  49. package/dist/validate_filter.d.ts +5 -5
  50. package/dist/validate_filter.js +60 -60
  51. package/package.json +49 -49
  52. package/source/opcua_server.ts +1 -1
  53. package/dist/I_register_server_manager.d.ts +0 -15
  54. package/dist/I_register_server_manager.js +0 -3
  55. package/dist/I_register_server_manager.js.map +0 -1
  56. package/dist/continuation_point_manager.d.ts +0 -18
  57. package/dist/continuation_point_manager.js +0 -84
  58. package/dist/continuation_point_manager.js.map +0 -1
@@ -1,16 +1,16 @@
1
- import { ServerSidePublishEngine, ServerSidePublishEngineOptions } from "./server_publish_engine";
2
- import { Subscription } from "./server_subscription";
3
- /**
4
- * the ServerSidePublishEngineForOrphanSubscription is keeping track of
5
- * live subscription that have been detached from timed out session.
6
- * It takes care of providing back those subscription to any session that
7
- * will claim them again with transferSubscription service
8
- * It also make sure that subscription are properly disposed when they expire.
9
- *
10
- * @internal
11
- */
12
- export declare class ServerSidePublishEngineForOrphanSubscription extends ServerSidePublishEngine {
13
- constructor(options: ServerSidePublishEngineOptions);
14
- add_subscription(subscription: Subscription): Subscription;
15
- detach_subscription(subscription: Subscription): Subscription;
16
- }
1
+ import { ServerSidePublishEngine, ServerSidePublishEngineOptions } from "./server_publish_engine";
2
+ import { Subscription } from "./server_subscription";
3
+ /**
4
+ * the ServerSidePublishEngineForOrphanSubscription is keeping track of
5
+ * live subscription that have been detached from timed out session.
6
+ * It takes care of providing back those subscription to any session that
7
+ * will claim them again with transferSubscription service
8
+ * It also make sure that subscription are properly disposed when they expire.
9
+ *
10
+ * @internal
11
+ */
12
+ export declare class ServerSidePublishEngineForOrphanSubscription extends ServerSidePublishEngine {
13
+ constructor(options: ServerSidePublishEngineOptions);
14
+ add_subscription(subscription: Subscription): Subscription;
15
+ detach_subscription(subscription: Subscription): Subscription;
16
+ }
@@ -1,50 +1,50 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ServerSidePublishEngineForOrphanSubscription = void 0;
4
- /**
5
- * @module node-opcua-server
6
- */
7
- // tslint:disable:no-console
8
- const chalk = require("chalk");
9
- const node_opcua_debug_1 = require("node-opcua-debug");
10
- const server_publish_engine_1 = require("./server_publish_engine");
11
- const debugLog = (0, node_opcua_debug_1.make_debugLog)(__filename);
12
- const doDebug = (0, node_opcua_debug_1.checkDebugFlag)(__filename);
13
- /**
14
- * the ServerSidePublishEngineForOrphanSubscription is keeping track of
15
- * live subscription that have been detached from timed out session.
16
- * It takes care of providing back those subscription to any session that
17
- * will claim them again with transferSubscription service
18
- * It also make sure that subscription are properly disposed when they expire.
19
- *
20
- * @internal
21
- */
22
- class ServerSidePublishEngineForOrphanSubscription extends server_publish_engine_1.ServerSidePublishEngine {
23
- constructor(options) {
24
- super(options);
25
- }
26
- add_subscription(subscription) {
27
- debugLog(chalk.bgCyan.yellow.bold(" adding live subscription with id="), subscription.id, " to orphan");
28
- super.add_subscription(subscription);
29
- // also add an event handler to detected when the subscription has ended
30
- // so we can automatically remove it from the orphan table
31
- subscription._expired_func = function () {
32
- debugLog(chalk.bgCyan.yellow(" Removing expired subscription with id="), this.id, " from orphan");
33
- // make sure all monitored item have been deleted
34
- // Xx subscription.terminate();
35
- // xx publish_engine.detach_subscription(subscription);
36
- // Xx subscription.dispose();
37
- };
38
- subscription.on("expired", subscription._expired_func);
39
- return subscription;
40
- }
41
- detach_subscription(subscription) {
42
- // un set the event handler
43
- super.detach_subscription(subscription);
44
- subscription.removeListener("expired", subscription._expired_func);
45
- subscription._expired_func = null;
46
- return subscription;
47
- }
48
- }
49
- exports.ServerSidePublishEngineForOrphanSubscription = ServerSidePublishEngineForOrphanSubscription;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ServerSidePublishEngineForOrphanSubscription = void 0;
4
+ /**
5
+ * @module node-opcua-server
6
+ */
7
+ // tslint:disable:no-console
8
+ const chalk = require("chalk");
9
+ const node_opcua_debug_1 = require("node-opcua-debug");
10
+ const server_publish_engine_1 = require("./server_publish_engine");
11
+ const debugLog = (0, node_opcua_debug_1.make_debugLog)(__filename);
12
+ const doDebug = (0, node_opcua_debug_1.checkDebugFlag)(__filename);
13
+ /**
14
+ * the ServerSidePublishEngineForOrphanSubscription is keeping track of
15
+ * live subscription that have been detached from timed out session.
16
+ * It takes care of providing back those subscription to any session that
17
+ * will claim them again with transferSubscription service
18
+ * It also make sure that subscription are properly disposed when they expire.
19
+ *
20
+ * @internal
21
+ */
22
+ class ServerSidePublishEngineForOrphanSubscription extends server_publish_engine_1.ServerSidePublishEngine {
23
+ constructor(options) {
24
+ super(options);
25
+ }
26
+ add_subscription(subscription) {
27
+ debugLog(chalk.bgCyan.yellow.bold(" adding live subscription with id="), subscription.id, " to orphan");
28
+ super.add_subscription(subscription);
29
+ // also add an event handler to detected when the subscription has ended
30
+ // so we can automatically remove it from the orphan table
31
+ subscription._expired_func = function () {
32
+ debugLog(chalk.bgCyan.yellow(" Removing expired subscription with id="), this.id, " from orphan");
33
+ // make sure all monitored item have been deleted
34
+ // Xx subscription.terminate();
35
+ // xx publish_engine.detach_subscription(subscription);
36
+ // Xx subscription.dispose();
37
+ };
38
+ subscription.on("expired", subscription._expired_func);
39
+ return subscription;
40
+ }
41
+ detach_subscription(subscription) {
42
+ // un set the event handler
43
+ super.detach_subscription(subscription);
44
+ subscription.removeListener("expired", subscription._expired_func);
45
+ subscription._expired_func = null;
46
+ return subscription;
47
+ }
48
+ }
49
+ exports.ServerSidePublishEngineForOrphanSubscription = ServerSidePublishEngineForOrphanSubscription;
50
50
  //# sourceMappingURL=server_publish_engine_for_orphan_subscriptions.js.map
@@ -1,180 +1,180 @@
1
- /**
2
- * @module node-opcua-server
3
- */
4
- /// <reference types="node" />
5
- import { EventEmitter } from "events";
6
- import { AddressSpace, ContinuationPointManager, ISessionBase, UADynamicVariableArray, UASessionDiagnosticsVariable, UASessionSecurityDiagnostics, DTSessionDiagnostics, DTSessionSecurityDiagnostics } from "node-opcua-address-space";
7
- import { SessionDiagnosticsDataType, SessionSecurityDiagnosticsDataType, SubscriptionDiagnosticsDataType } from "node-opcua-common";
8
- import { NodeId } from "node-opcua-nodeid";
9
- import { ObjectRegistry } from "node-opcua-object-registry";
10
- import { StatusCode } from "node-opcua-status-code";
11
- import { WatchDog } from "node-opcua-utils";
12
- import { ISubscriber, IWatchdogData2 } from "node-opcua-utils";
13
- import { IServerSession, IServerSessionBase, ServerSecureChannelLayer } from "node-opcua-secure-channel";
14
- import { ApplicationDescription, UserIdentityToken, CreateSubscriptionRequestOptions, EndpointDescription } from "node-opcua-types";
15
- import { ServerSidePublishEngine } from "./server_publish_engine";
16
- import { Subscription } from "./server_subscription";
17
- import { ServerEngine } from "./server_engine";
18
- /**
19
- *
20
- * A Server session object.
21
- *
22
- * **from OPCUA Spec 1.02:**
23
- *
24
- * * Sessions are created to be independent of the underlying communications connection. Therefore, if a communication
25
- * connection fails, the Session is not immediately affected. The exact mechanism to recover from an underlying
26
- * communication connection error depends on the SecureChannel mapping as described in Part 6.
27
- *
28
- * * Sessions are terminated by the Server automatically if the Client fails to issue a Service request on the Session
29
- * within the timeout period negotiated by the Server in the CreateSession Service response. This protects the Server
30
- * against Client failures and against situations where a failed underlying connection cannot be re-established.
31
- *
32
- * * Clients shall be prepared to submit requests in a timely manner to prevent the Session from closing automatically.
33
- *
34
- * * Clients may explicitly terminate Sessions using the CloseSession Service.
35
- *
36
- * * When a Session is terminated, all outstanding requests on the Session are aborted and BadSessionClosed StatusCodes
37
- * are returned to the Client. In addition, the Server deletes the entry for the Client from its
38
- * SessionDiagnosticsArray Variable and notifies any other Clients who were subscribed to this entry.
39
- *
40
- */
41
- export declare class ServerSession extends EventEmitter implements ISubscriber, ISessionBase, IServerSession, IServerSessionBase {
42
- static registry: ObjectRegistry;
43
- static maxPublishRequestInQueue: number;
44
- __status: string;
45
- parent: ServerEngine;
46
- authenticationToken: NodeId;
47
- nodeId: NodeId;
48
- sessionName: string;
49
- publishEngine: ServerSidePublishEngine;
50
- sessionObject: any;
51
- readonly creationDate: Date;
52
- sessionTimeout: number;
53
- sessionDiagnostics?: UASessionDiagnosticsVariable<DTSessionDiagnostics>;
54
- sessionSecurityDiagnostics?: UASessionSecurityDiagnostics<DTSessionSecurityDiagnostics>;
55
- subscriptionDiagnosticsArray?: UADynamicVariableArray<SubscriptionDiagnosticsDataType>;
56
- channel?: ServerSecureChannelLayer;
57
- nonce?: Buffer;
58
- userIdentityToken?: UserIdentityToken;
59
- clientDescription?: ApplicationDescription;
60
- channelId?: number | null;
61
- continuationPointManager: ContinuationPointManager;
62
- _watchDog?: WatchDog;
63
- _watchDogData?: IWatchdogData2;
64
- keepAlive: () => void;
65
- private _registeredNodesCounter;
66
- private _registeredNodes;
67
- private _registeredNodesInv;
68
- private _cumulatedSubscriptionCount;
69
- private _sessionDiagnostics?;
70
- private _sessionSecurityDiagnostics?;
71
- private channel_abort_event_handler;
72
- constructor(parent: ServerEngine, sessionTimeout: number);
73
- getSessionId(): NodeId;
74
- endpoint?: EndpointDescription;
75
- getEndpointDescription(): EndpointDescription;
76
- dispose(): void;
77
- get clientConnectionTime(): Date;
78
- /**
79
- * return the number of milisecond since last session transaction occurs from client
80
- * the first transaction is the creation of the session
81
- */
82
- get clientLastContactTime(): number;
83
- get status(): string;
84
- set status(value: string);
85
- get addressSpace(): AddressSpace | null;
86
- get currentPublishRequestInQueue(): number;
87
- updateClientLastContactTime(): void;
88
- /**
89
- * @method onClientSeen
90
- * required for watch dog
91
- * @param currentTime {DateTime}
92
- * @private
93
- */
94
- onClientSeen(): void;
95
- incrementTotalRequestCount(): void;
96
- incrementRequestTotalCounter(counterName: string): void;
97
- incrementRequestErrorCounter(counterName: string): void;
98
- /**
99
- * returns rootFolder.objects.server.serverDiagnostics.sessionsDiagnosticsSummary.sessionDiagnosticsArray
100
- */
101
- getSessionDiagnosticsArray(): UADynamicVariableArray<SessionDiagnosticsDataType>;
102
- /**
103
- * returns rootFolder.objects.server.serverDiagnostics.sessionsDiagnosticsSummary.sessionSecurityDiagnosticsArray
104
- */
105
- getSessionSecurityDiagnosticsArray(): UADynamicVariableArray<SessionSecurityDiagnosticsDataType>;
106
- /**
107
- * number of active subscriptions
108
- */
109
- get currentSubscriptionCount(): number;
110
- /**
111
- * number of subscriptions ever created since this object is live
112
- */
113
- get cumulatedSubscriptionCount(): number;
114
- /**
115
- * number of monitored items
116
- */
117
- get currentMonitoredItemCount(): number;
118
- /**
119
- * retrieve an existing subscription by subscriptionId
120
- * @method getSubscription
121
- * @param subscriptionId {Number}
122
- * @return {Subscription}
123
- */
124
- getSubscription(subscriptionId: number): Subscription | null;
125
- /**
126
- * @method deleteSubscription
127
- * @param subscriptionId {Number}
128
- * @return {StatusCode}
129
- */
130
- deleteSubscription(subscriptionId: number): StatusCode;
131
- /**
132
- * close a ServerSession, this will also delete the subscriptions if the flag is set.
133
- *
134
- * Spec extract:
135
- *
136
- * If a Client invokes the CloseSession Service then all Subscriptions associated with the Session are also deleted
137
- * if the deleteSubscriptions flag is set to TRUE. If a Server terminates a Session for any other reason,
138
- * Subscriptions associated with the Session, are not deleted. Each Subscription has its own lifetime to protect
139
- * against data loss in the case of a Session termination. In these cases, the Subscription can be reassigned to
140
- * another Client before its lifetime expires.
141
- *
142
- * @method close
143
- * @param deleteSubscriptions : should we delete subscription ?
144
- * @param [reason = "CloseSession"] the reason for closing the session
145
- * (shall be "Timeout", "Terminated" or "CloseSession")
146
- *
147
- */
148
- close(deleteSubscriptions: boolean, reason: string): void;
149
- registerNode(nodeId: NodeId): NodeId;
150
- unRegisterNode(aliasNodeId: NodeId): void;
151
- resolveRegisteredNode(aliasNodeId: NodeId): NodeId;
152
- /**
153
- * true if the underlying channel has been closed or aborted...
154
- */
155
- get aborted(): boolean;
156
- createSubscription(parameters: CreateSubscriptionRequestOptions): Subscription;
157
- _attach_channel(channel: ServerSecureChannelLayer): void;
158
- _detach_channel(): void;
159
- _exposeSubscriptionDiagnostics(subscription: Subscription): void;
160
- _unexposeSubscriptionDiagnostics(subscription: Subscription): void;
161
- /**
162
- * @method watchdogReset
163
- * used as a callback for the Watchdog
164
- * @private
165
- */
166
- watchdogReset(): void;
167
- private _createSessionObjectInAddressSpace;
168
- /**
169
- *
170
- * @private
171
- */
172
- private _removeSessionObjectFromAddressSpace;
173
- /**
174
- *
175
- * @private
176
- */
177
- private _getSubscriptionDiagnosticsArray;
178
- private assignSubscription;
179
- private _deleteSubscriptions;
180
- }
1
+ /**
2
+ * @module node-opcua-server
3
+ */
4
+ /// <reference types="node" />
5
+ import { EventEmitter } from "events";
6
+ import { AddressSpace, ContinuationPointManager, ISessionBase, UADynamicVariableArray, UASessionDiagnosticsVariable, UASessionSecurityDiagnostics, DTSessionDiagnostics, DTSessionSecurityDiagnostics } from "node-opcua-address-space";
7
+ import { SessionDiagnosticsDataType, SessionSecurityDiagnosticsDataType, SubscriptionDiagnosticsDataType } from "node-opcua-common";
8
+ import { NodeId } from "node-opcua-nodeid";
9
+ import { ObjectRegistry } from "node-opcua-object-registry";
10
+ import { StatusCode } from "node-opcua-status-code";
11
+ import { WatchDog } from "node-opcua-utils";
12
+ import { ISubscriber, IWatchdogData2 } from "node-opcua-utils";
13
+ import { IServerSession, IServerSessionBase, ServerSecureChannelLayer } from "node-opcua-secure-channel";
14
+ import { ApplicationDescription, UserIdentityToken, CreateSubscriptionRequestOptions, EndpointDescription } from "node-opcua-types";
15
+ import { ServerSidePublishEngine } from "./server_publish_engine";
16
+ import { Subscription } from "./server_subscription";
17
+ import { ServerEngine } from "./server_engine";
18
+ /**
19
+ *
20
+ * A Server session object.
21
+ *
22
+ * **from OPCUA Spec 1.02:**
23
+ *
24
+ * * Sessions are created to be independent of the underlying communications connection. Therefore, if a communication
25
+ * connection fails, the Session is not immediately affected. The exact mechanism to recover from an underlying
26
+ * communication connection error depends on the SecureChannel mapping as described in Part 6.
27
+ *
28
+ * * Sessions are terminated by the Server automatically if the Client fails to issue a Service request on the Session
29
+ * within the timeout period negotiated by the Server in the CreateSession Service response. This protects the Server
30
+ * against Client failures and against situations where a failed underlying connection cannot be re-established.
31
+ *
32
+ * * Clients shall be prepared to submit requests in a timely manner to prevent the Session from closing automatically.
33
+ *
34
+ * * Clients may explicitly terminate Sessions using the CloseSession Service.
35
+ *
36
+ * * When a Session is terminated, all outstanding requests on the Session are aborted and BadSessionClosed StatusCodes
37
+ * are returned to the Client. In addition, the Server deletes the entry for the Client from its
38
+ * SessionDiagnosticsArray Variable and notifies any other Clients who were subscribed to this entry.
39
+ *
40
+ */
41
+ export declare class ServerSession extends EventEmitter implements ISubscriber, ISessionBase, IServerSession, IServerSessionBase {
42
+ static registry: ObjectRegistry;
43
+ static maxPublishRequestInQueue: number;
44
+ __status: string;
45
+ parent: ServerEngine;
46
+ authenticationToken: NodeId;
47
+ nodeId: NodeId;
48
+ sessionName: string;
49
+ publishEngine: ServerSidePublishEngine;
50
+ sessionObject: any;
51
+ readonly creationDate: Date;
52
+ sessionTimeout: number;
53
+ sessionDiagnostics?: UASessionDiagnosticsVariable<DTSessionDiagnostics>;
54
+ sessionSecurityDiagnostics?: UASessionSecurityDiagnostics<DTSessionSecurityDiagnostics>;
55
+ subscriptionDiagnosticsArray?: UADynamicVariableArray<SubscriptionDiagnosticsDataType>;
56
+ channel?: ServerSecureChannelLayer;
57
+ nonce?: Buffer;
58
+ userIdentityToken?: UserIdentityToken;
59
+ clientDescription?: ApplicationDescription;
60
+ channelId?: number | null;
61
+ continuationPointManager: ContinuationPointManager;
62
+ _watchDog?: WatchDog;
63
+ _watchDogData?: IWatchdogData2;
64
+ keepAlive: () => void;
65
+ private _registeredNodesCounter;
66
+ private _registeredNodes;
67
+ private _registeredNodesInv;
68
+ private _cumulatedSubscriptionCount;
69
+ private _sessionDiagnostics?;
70
+ private _sessionSecurityDiagnostics?;
71
+ private channel_abort_event_handler;
72
+ constructor(parent: ServerEngine, sessionTimeout: number);
73
+ getSessionId(): NodeId;
74
+ endpoint?: EndpointDescription;
75
+ getEndpointDescription(): EndpointDescription;
76
+ dispose(): void;
77
+ get clientConnectionTime(): Date;
78
+ /**
79
+ * return the number of milisecond since last session transaction occurs from client
80
+ * the first transaction is the creation of the session
81
+ */
82
+ get clientLastContactTime(): number;
83
+ get status(): string;
84
+ set status(value: string);
85
+ get addressSpace(): AddressSpace | null;
86
+ get currentPublishRequestInQueue(): number;
87
+ updateClientLastContactTime(): void;
88
+ /**
89
+ * @method onClientSeen
90
+ * required for watch dog
91
+ * @param currentTime {DateTime}
92
+ * @private
93
+ */
94
+ onClientSeen(): void;
95
+ incrementTotalRequestCount(): void;
96
+ incrementRequestTotalCounter(counterName: string): void;
97
+ incrementRequestErrorCounter(counterName: string): void;
98
+ /**
99
+ * returns rootFolder.objects.server.serverDiagnostics.sessionsDiagnosticsSummary.sessionDiagnosticsArray
100
+ */
101
+ getSessionDiagnosticsArray(): UADynamicVariableArray<SessionDiagnosticsDataType>;
102
+ /**
103
+ * returns rootFolder.objects.server.serverDiagnostics.sessionsDiagnosticsSummary.sessionSecurityDiagnosticsArray
104
+ */
105
+ getSessionSecurityDiagnosticsArray(): UADynamicVariableArray<SessionSecurityDiagnosticsDataType>;
106
+ /**
107
+ * number of active subscriptions
108
+ */
109
+ get currentSubscriptionCount(): number;
110
+ /**
111
+ * number of subscriptions ever created since this object is live
112
+ */
113
+ get cumulatedSubscriptionCount(): number;
114
+ /**
115
+ * number of monitored items
116
+ */
117
+ get currentMonitoredItemCount(): number;
118
+ /**
119
+ * retrieve an existing subscription by subscriptionId
120
+ * @method getSubscription
121
+ * @param subscriptionId {Number}
122
+ * @return {Subscription}
123
+ */
124
+ getSubscription(subscriptionId: number): Subscription | null;
125
+ /**
126
+ * @method deleteSubscription
127
+ * @param subscriptionId {Number}
128
+ * @return {StatusCode}
129
+ */
130
+ deleteSubscription(subscriptionId: number): StatusCode;
131
+ /**
132
+ * close a ServerSession, this will also delete the subscriptions if the flag is set.
133
+ *
134
+ * Spec extract:
135
+ *
136
+ * If a Client invokes the CloseSession Service then all Subscriptions associated with the Session are also deleted
137
+ * if the deleteSubscriptions flag is set to TRUE. If a Server terminates a Session for any other reason,
138
+ * Subscriptions associated with the Session, are not deleted. Each Subscription has its own lifetime to protect
139
+ * against data loss in the case of a Session termination. In these cases, the Subscription can be reassigned to
140
+ * another Client before its lifetime expires.
141
+ *
142
+ * @method close
143
+ * @param deleteSubscriptions : should we delete subscription ?
144
+ * @param [reason = "CloseSession"] the reason for closing the session
145
+ * (shall be "Timeout", "Terminated" or "CloseSession")
146
+ *
147
+ */
148
+ close(deleteSubscriptions: boolean, reason: string): void;
149
+ registerNode(nodeId: NodeId): NodeId;
150
+ unRegisterNode(aliasNodeId: NodeId): void;
151
+ resolveRegisteredNode(aliasNodeId: NodeId): NodeId;
152
+ /**
153
+ * true if the underlying channel has been closed or aborted...
154
+ */
155
+ get aborted(): boolean;
156
+ createSubscription(parameters: CreateSubscriptionRequestOptions): Subscription;
157
+ _attach_channel(channel: ServerSecureChannelLayer): void;
158
+ _detach_channel(): void;
159
+ _exposeSubscriptionDiagnostics(subscription: Subscription): void;
160
+ _unexposeSubscriptionDiagnostics(subscription: Subscription): void;
161
+ /**
162
+ * @method watchdogReset
163
+ * used as a callback for the Watchdog
164
+ * @private
165
+ */
166
+ watchdogReset(): void;
167
+ private _createSessionObjectInAddressSpace;
168
+ /**
169
+ *
170
+ * @private
171
+ */
172
+ private _removeSessionObjectFromAddressSpace;
173
+ /**
174
+ *
175
+ * @private
176
+ */
177
+ private _getSubscriptionDiagnosticsArray;
178
+ private assignSubscription;
179
+ private _deleteSubscriptions;
180
+ }