Options
All
  • Public
  • Public/Protected
  • All
Menu

  subscribe now with sterfive to access the online-user manual

A Server session object.

from OPCUA Spec 1.02:

  • Sessions are created to be independent of the underlying communications connection. Therefore, if a communication connection fails, the Session is not immediately affected. The exact mechanism to recover from an underlying communication connection error depends on the SecureChannel mapping as described in Part 6.

  • Sessions are terminated by the Server automatically if the Client fails to issue a Service request on the Session within the timeout period negotiated by the Server in the CreateSession Service response. This protects the Server against Client failures and against situations where a failed underlying connection cannot be re-established.

  • Clients shall be prepared to submit requests in a timely manner to prevent the Session from closing automatically.

  • Clients may explicitly terminate Sessions using the CloseSession Service.

  • When a Session is terminated, all outstanding requests on the Session are aborted and BadSessionClosed StatusCodes are returned to the Client. In addition, the Server deletes the entry for the Client from its SessionDiagnosticsArray Variable and notifies any other Clients who were subscribed to this entry.

Hierarchy

  • EventEmitter
    • ServerSession

Implements

Index

Constructors

constructor

  • Parameters

    Returns ServerSession

Properties

__status

__status: string

Optional _watchDog

_watchDog: WatchDog

Optional _watchDogData

_watchDogData: IWatchdogData2

authenticationToken

authenticationToken: NodeId

Optional channel

Optional channelId

channelId: number

Optional clientDescription

clientDescription: ApplicationDescription

continuationPointManager

continuationPointManager: ContinuationPointManager

Readonly creationDate

creationDate: Date

Optional endpoint

keepAlive

keepAlive: () => void

Type declaration

    • (): void
    • Returns void

nodeId

nodeId: NodeId

Optional nonce

nonce: Buffer

parent

parent: ServerEngine

publishEngine

Optional sessionDiagnostics

sessionDiagnostics: UASessionDiagnostics

sessionName

sessionName: string

sessionObject

sessionObject: any

Optional sessionSecurityDiagnostics

sessionSecurityDiagnostics: UASessionSecurityDiagnostics

sessionTimeout

sessionTimeout: number

Optional subscriptionDiagnosticsArray

Optional userIdentityToken

userIdentityToken: UserIdentityToken

Readonly Static captureRejectionSymbol

captureRejectionSymbol: typeof captureRejectionSymbol

Static captureRejections

captureRejections: boolean

Sets or gets the default captureRejection value for all emitters.

Static defaultMaxListeners

defaultMaxListeners: number

Readonly Static errorMonitor

errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted, therefore the process will still crash if no regular 'error' listener is installed.

Static maxPublishRequestInQueue

maxPublishRequestInQueue: number

Static registry

registry: ObjectRegistry

Accessors

aborted

  • get aborted(): boolean
  • true if the underlying channel has been closed or aborted...

    Returns boolean

addressSpace

  • Returns AddressSpace

clientConnectionTime

  • get clientConnectionTime(): Date
  • Returns Date

clientLastContactTime

  • get clientLastContactTime(): number
  • Returns number

cumulatedSubscriptionCount

  • get cumulatedSubscriptionCount(): number
  • number of subscriptions ever created since this object is live

    Returns number

currentMonitoredItemCount

  • get currentMonitoredItemCount(): number
  • number of monitored items

    Returns number

currentPublishRequestInQueue

  • get currentPublishRequestInQueue(): number
  • Returns number

currentSubscriptionCount

  • get currentSubscriptionCount(): number
  • number of active subscriptions

    Returns number

status

  • get status(): string
  • set status(value: string): any
  • Returns string

  • Parameters

    • value: string

    Returns any

Methods

_attach_channel

  • Parameters

    Returns void

_detach_channel

  • _detach_channel(): void
  • Returns void

_exposeSubscriptionDiagnostics

  • _exposeSubscriptionDiagnostics(subscription: Subscription): void
  • Parameters

    Returns void

_unexposeSubscriptionDiagnostics

  • _unexposeSubscriptionDiagnostics(subscription: Subscription): void
  • Parameters

    Returns void

addListener

  • addListener(event: string | symbol, listener: (...args: any[]) => void): ServerSession
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns ServerSession

close

  • close(deleteSubscriptions: boolean, reason: string): void
  • close a ServerSession, this will also delete the subscriptions if the flag is set.

    Spec extract:

    If a Client invokes the CloseSession Service then all Subscriptions associated with the Session are also deleted if the deleteSubscriptions flag is set to TRUE. If a Server terminates a Session for any other reason, Subscriptions associated with the Session, are not deleted. Each Subscription has its own lifetime to protect against data loss in the case of a Session termination. In these cases, the Subscription can be reassigned to another Client before its lifetime expires.

    method

    close

    Parameters

    • deleteSubscriptions: boolean

      : should we delete subscription ?

    • reason: string

    Returns void

createSubscription

deleteSubscription

  • deleteSubscription(subscriptionId: number): StatusCode
  • method

    deleteSubscription

    Parameters

    • subscriptionId: number

    Returns StatusCode

dispose

  • dispose(): void
  • Returns void

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

eventNames

  • eventNames(): (string | symbol)[]
  • Returns (string | symbol)[]

getEndpointDescription

  • Returns EndpointDescription

getMaxListeners

  • getMaxListeners(): number
  • Returns number

getSessionDiagnosticsArray

getSessionId

getSessionSecurityDiagnosticsArray

getSubscription

  • retrieve an existing subscription by subscriptionId

    method

    getSubscription

    Parameters

    • subscriptionId: number

    Returns Subscription

incrementRequestErrorCounter

  • incrementRequestErrorCounter(counterName: string): void

incrementRequestTotalCounter

  • incrementRequestTotalCounter(counterName: string): void

incrementTotalRequestCount

  • incrementTotalRequestCount(): void

listenerCount

  • listenerCount(event: string | symbol): number
  • Parameters

    • event: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

off

  • off(event: string | symbol, listener: (...args: any[]) => void): ServerSession
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns ServerSession

on

  • on(event: string | symbol, listener: (...args: any[]) => void): ServerSession
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns ServerSession

once

  • once(event: string | symbol, listener: (...args: any[]) => void): ServerSession
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns ServerSession

prependListener

  • prependListener(event: string | symbol, listener: (...args: any[]) => void): ServerSession
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns ServerSession

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): ServerSession
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns ServerSession

rawListeners

  • rawListeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

registerNode

  • registerNode(nodeId: NodeId): any
  • Parameters

    Returns any

removeAllListeners

  • Parameters

    • Optional event: string | symbol

    Returns ServerSession

removeListener

  • removeListener(event: string | symbol, listener: (...args: any[]) => void): ServerSession
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns ServerSession

resolveRegisteredNode

  • Parameters

    Returns NodeId

setMaxListeners

  • Parameters

    • n: number

    Returns ServerSession

unRegisterNode

  • unRegisterNode(aliasNodeId: NodeId): void
  • Parameters

    Returns void

updateClientLastContactTime

  • updateClientLastContactTime(): void
  • Returns void

Static listenerCount

  • listenerCount(emitter: EventEmitter, event: string | symbol): number
  • deprecated

    since v4.0.0

    Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

Static on

  • on(emitter: EventEmitter, event: string): AsyncIterableIterator<any>
  • Parameters

    • emitter: EventEmitter
    • event: string

    Returns AsyncIterableIterator<any>

Static once

  • once(emitter: NodeEventTarget, event: string | symbol): Promise<any[]>
  • once(emitter: DOMEventTarget, event: string): Promise<any[]>
  • Parameters

    • emitter: NodeEventTarget
    • event: string | symbol

    Returns Promise<any[]>

  • Parameters

    • emitter: DOMEventTarget
    • event: string

    Returns Promise<any[]>

Generated using TypeDoc