/** * A wrapper around {@link node-opcua~ClientSession} used to connect to atvise server. * The sessions currentyl being opened. * @type {Set} */ export default class Session { /** * Creates an {@link node-opcuaOPCUAClient} and opens a new {@link node-opcua~ClientSession}. * @return {Promise} Fulfilled with an already opened * {@link node-opcua~ClientSession}. */ static _create(): Promise; /** * Creates an {@link node-opcuaOPCUAClient} and opens a new {@link node-opcua~ClientSession}. If * pooling is active, the shared session will be reused. * @return {Promise} Fulfilled with an already opened * {@link node-opcua~ClientSession}. */ static create(): Promise; /** * Starts pooling (reusing) sessions. Note that you'll have to manually close sessions using * {@link Session.closeOpen}. */ static pool(): void; /** * Closes the given session. Waits for currently opening sessions to open. * @param {node-opcua~ClientSession} session The session to close. * @return {Promise} Fulfilled with the (now closed!) session or * rejected with the error that occured while closing. */ static _close(session: any): Promise; /** * Closes the given session. When session pooling is active the session won't actually be closed * and the returned Promise will resolve immediately. * @param {node-opcua~ClientSession} session The session to close. * @return {Promise} Fulfilled with the (maybe closed) session or * rejected with the error that occured while closing. */ static close(session: any): Promise; /** * The sessions currently open. Starting with version 1.0.0-beta.25 there will be one at most. * @type {Session[]} */ static get open(): Session[]; /** * Closes all open sessions. * @return {Promise} Rejected with the error that occurred while closing the * sessions or fulfilled with the (now closed) sessions affected. */ static closeOpen(): Promise; }