Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ClientSessionImpl

class

ClientSession

param
constructor

Hierarchy

  • EventEmitter
    • ClientSessionImpl

Implements

Index

Constructors

constructor

Properties

_client

_client: any

_closeEventHasBeenEmitted

_closeEventHasBeenEmitted: boolean

_closed

_closed: boolean

Optional authenticationToken

authenticationToken: NodeId

lastRequestSentTime

lastRequestSentTime: Date

lastResponseReceivedTime

lastResponseReceivedTime: Date

name

name: string = ""

requestedMaxReferencesPerNode

requestedMaxReferencesPerNode: number

serverCertificate

serverCertificate: Certificate

serverEndpoints

serverEndpoints: any[] = []

Optional serverNonce

serverNonce: Nonce

Optional serverSignature

serverSignature: SignatureData

sessionId

sessionId: NodeId

timeout

timeout: number

Static defaultMaxListeners

defaultMaxListeners: number

Accessors

endpoint

  • get endpoint(): EndpointDescription

isReconnecting

  • get isReconnecting(): any

subscriptionCount

  • get subscriptionCount(): number

Methods

_callMethodCondition

  • _callMethodCondition(methodName: string, conditionId: NodeIdLike, eventId: Buffer, comment: LocalizedTextLike, callback: function): void

_terminatePublishEngine

  • _terminatePublishEngine(): void

acknowledgeCondition

addCommentCondition

addListener

  • addListener(event: string | symbol, listener: function): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

browse

browseNext

  • browseNext(continuationPoint: Buffer, releaseContinuationPoints: boolean, callback: ResponseCallback<BrowseResult>): void
  • browseNext(continuationPoints: Buffer[], releaseContinuationPoints: boolean, callback: ResponseCallback<BrowseResult[]>): void
  • browseNext(continuationPoint: Buffer, releaseContinuationPoints: boolean): Promise<BrowseResult>
  • browseNext(continuationPoints: Buffer[], releaseContinuationPoints: boolean): Promise<BrowseResult[]>

call

  • call(methodToCall: CallMethodRequestLike): Promise<CallMethodResult>
  • call(methodToCall: CallMethodRequestLike[]): Promise<CallMethodResult[]>
  • call(methodToCall: CallMethodRequestLike, callback: ResponseCallback<CallMethodResult>): void
  • call(methodsToCall: CallMethodRequestLike[], callback: ResponseCallback<CallMethodResult[]>): void

close

  • close(callback: ErrorCallback): void
  • close(deleteSubscription: boolean, callback: ErrorCallback): void
  • close(deleteSubscription?: boolean): Promise<void>

confirmCondition

constructExtensionObject

  • constructExtensionObject(dataType: NodeId, pojo: any): Promise<ExtensionObject>

createMonitoredItems

createSubscription

createSubscription2

deleteMonitoredItems

deleteSubscriptions

disableCondition

  • disableCondition(): void

dispose

  • dispose(): void

emit

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

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

    Returns boolean

emitCloseEvent

  • emitCloseEvent(statusCode: StatusCode): void

enableCondition

  • enableCondition(): void

evaluateRemainingLifetime

  • evaluateRemainingLifetime(): number
  • evaluate the remaining time for the session

    evaluate the time in milliseconds that the session will live on the server end from now. The remaining live time is calculated based on when the last message was sent to the server and the session timeout.

    • In normal operation , when server and client communicates on a regular basis, evaluateRemainingLifetime will return a number slightly below session.timeout

    • when the client and server cannot communicate due to a network issue (or a server crash), evaluateRemainingLifetime returns the estimated number of milliseconds before the server (if not crash) will keep the session alive on its end to allow a automatic reconnection with session.

    • When evaluateRemainingLifetime returns zero , this mean that the session has probably ended on the server side and will have to be recreated from scratch in case of a reconnection.

    Returns number

    the number of milliseconds before session expires

eventNames

  • eventNames(): Array<string | symbol>
  • Returns Array<string | symbol>

extractNamespaceDataType

  • extractNamespaceDataType(): Promise<ExtraDataTypeManager>

findMethodId

getArgumentDefinition

  • getArgumentDefinition(methodId: MethodId): Promise<ArgumentDefinition>
  • getArgumentDefinition(methodId: MethodId, callback: ResponseCallback<ArgumentDefinition>): void

getBuiltInDataType

  • getBuiltInDataType(...args: any[]): any

getExtensionObjectConstructor

  • getExtensionObjectConstructor(dataTypeNodeId: NodeId): Promise<AnyConstructorFunc>

getMaxListeners

  • getMaxListeners(): number
  • Returns number

getMonitoredItems

getNamespaceIndex

  • getNamespaceIndex(namespaceUri: string): number

getPublishEngine

hasBeenClosed

  • hasBeenClosed(): boolean

isChannelValid

  • isChannelValid(): boolean

listenerCount

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

    • type: string | symbol

    Returns number

listeners

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

    • event: string | symbol

    Returns Function[]

modifyMonitoredItems

modifySubscription

off

  • off(event: string | symbol, listener: function): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

on

  • on(event: string | symbol, listener: function): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

once

  • once(event: string | symbol, listener: function): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

performMessageTransaction

  • performMessageTransaction(request: Request, callback: function): void

prependListener

  • prependListener(event: string | symbol, listener: function): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: function): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

publish

  • publish(options: PublishRequest, callback: function): void
  • method

    publish

    async

    Parameters

    • options: PublishRequest
    • callback: function
        • (err: Error | null, response?: PublishResponse): void
        • Parameters

          • err: Error | null

            the Error if the async method has failed

          • Optional response: PublishResponse

            the response

          Returns void

    Returns void

queryFirst

rawListeners

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

    • event: string | symbol

    Returns Function[]

read

readAllAttributes

  • readAllAttributes(node: NodeIdLike, callback: function): void
  • readAllAttributes(nodes: NodeIdLike[], callback: function): void

readHistoryValue

readNamespaceArray

  • readNamespaceArray(): Promise<string[]>
  • readNamespaceArray(callback: function): void

readVariableValue

registerNodes

  • registerNodes(nodesToRegister: NodeIdLike[]): Promise<NodeId[]>
  • registerNodes(nodesToRegister: NodeIdLike[], callback: function): void

removeAllListeners

  • removeAllListeners(event?: string | symbol): this
  • Parameters

    • Optional event: string | symbol

    Returns this

removeListener

  • removeListener(event: string | symbol, listener: function): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

republish

  • republish(options: RepublishRequest, callback: function): void
  • method

    republish

    async

    Parameters

    • options: RepublishRequest
    • callback: function

      the callback

        • (err: Error | null, response?: RepublishResponse): void
        • Parameters

          • err: Error | null
          • Optional response: RepublishResponse

          Returns void

    Returns void

resumePublishEngine

  • resumePublishEngine(): void

setMaxListeners

  • setMaxListeners(n: number): this
  • Parameters

    • n: number

    Returns this

setMonitoringMode

setPublishingMode

  • setPublishingMode(publishingEnabled: boolean, subscriptionId: SubscriptionId): Promise<StatusCode>
  • setPublishingMode(publishingEnabled: boolean, subscriptionIds: SubscriptionId[]): Promise<StatusCode[]>
  • setPublishingMode(publishingEnabled: boolean, subscriptionId: SubscriptionId, callback: function): void
  • setPublishingMode(publishingEnabled: boolean, subscriptionIds: SubscriptionId[], callback: function): void

startKeepAliveManager

  • startKeepAliveManager(): void

stopKeepAliveManager

  • stopKeepAliveManager(): void

toString

  • toString(): string

transferSubscriptions

translateBrowsePath

  • translateBrowsePath(browsePath: BrowsePath, callback: ResponseCallback<BrowsePathResult>): void
  • translateBrowsePath(browsesPath: BrowsePath[], callback: ResponseCallback<BrowsePathResult[]>): void
  • translateBrowsePath(browsePath: BrowsePath): Promise<BrowsePathResult>
  • translateBrowsePath(browsePaths: BrowsePath[]): Promise<BrowsePathResult[]>

unregisterNodes

  • unregisterNodes(nodesToUnregister: NodeIdLike[]): Promise<void>
  • unregisterNodes(nodesToUnregister: NodeIdLike[], callback: function): void

write

writeSingleNode

Static listenerCount

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

    since v4.0.0

    Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

Generated using TypeDoc