C# Class Opc.Ua.Server.Session

A generic session manager object for a server.
Inheritance: IDisposable
Mostra file Open project: OPCFoundation/UA-.NET Class Usage Examples

Private Properties

Property Type Description
InitializeSessionAuditEvent void
OnUpdateDiagnostics ServiceResult
OnUpdateSecurityDiagnostics ServiceResult
ReportAuditActivateSessionEvent void
ReportAuditCreateSessionEvent void
Session System
TraceState void
UpdateDiagnosticCounters void
UpdateUserIdentity bool
ValidateUserIdentityToken UserIdentityToken

Public Methods

Method Description
Activate ( OperationContext context, List clientSoftwareCertificates, UserIdentityToken identityToken, IUserIdentity identity, IUserIdentity effectiveIdentity, StringCollection localeIds, byte serverNonce ) : bool

Activates the session and binds it to the current secure channel.

Close ( ) : void

Closes a session and removes itself from the address space.

Dispose ( ) : void

Frees any unmanaged resources.

IsSecureChannelValid ( string secureChannelId ) : bool

Checks if the secure channel is currently valid.

RestoreContinuationPoint ( byte continuationPoint ) : ContinuationPoint

Restores a continuation point for a session.

The caller is responsible for disposing the continuation point returned.

RestoreHistoryContinuationPoint ( byte continuationPoint ) : object

Restores a previously saves history continuation point.

SaveContinuationPoint ( ContinuationPoint continuationPoint ) : void

Saves a continuation point for a session.

If the session has too many continuation points the oldest one is dropped.

SaveHistoryContinuationPoint ( System.Guid id, object continuationPoint ) : void

Saves a continuation point used for historical reads.

If the continuationPoint implements IDisposable it will be disposed when the Session is closed or discarded.

UpdateLocaleIds ( StringCollection localeIds ) : bool

Updates the requested locale ids.

ValidateBeforeActivate ( OperationContext context, SignatureData clientSignature, List clientSoftwareCertificates, ExtensionObject userIdentityToken, SignatureData userTokenSignature, StringCollection localeIds, byte serverNonce, UserIdentityToken &identityToken, UserTokenPolicy &userTokenPolicy ) : void

Activates the session and binds it to the current secure channel.

ValidateRequest ( RequestHeader requestHeader, RequestType requestType ) : void

Validates the request.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

An overrideable version of the Dispose.

Private Methods

Method Description
InitializeSessionAuditEvent ( ServerSystemContext systemContext, AuditEventState e, TranslationInfo message ) : void

Initializes a session audit event.

OnUpdateDiagnostics ( ISystemContext context, NodeState node, object &value ) : ServiceResult

Returns a copy of the current diagnostics.

OnUpdateSecurityDiagnostics ( ISystemContext context, NodeState node, object &value ) : ServiceResult

Returns a copy of the current security diagnostics.

ReportAuditActivateSessionEvent ( ServerSystemContext context ) : void

Reports an audit activate session event.

ReportAuditCreateSessionEvent ( ServerSystemContext context ) : void

Reports an audit create session event.

Session ( OperationContext context, IServerInternal server, X509Certificate2 serverCertificate, NodeId authenticationToken, byte serverNonce, string sessionName, ApplicationDescription clientDescription, string endpointUrl, X509Certificate2 clientCertificate, double sessionTimeout, uint maxResponseMessageSize, double maxRequestAge, int maxBrowseContinuationPoints, int maxHistoryContinuationPoints ) : System
TraceState ( string context ) : void

Dumps the current state of the session queue.

UpdateDiagnosticCounters ( RequestType requestType, bool error, bool authorizationError ) : void
UpdateUserIdentity ( UserIdentityToken identityToken, IUserIdentity identity, IUserIdentity effectiveIdentity ) : bool

Updates the user identity.

ValidateUserIdentityToken ( ExtensionObject identityToken, SignatureData userTokenSignature, UserTokenPolicy &policy ) : UserIdentityToken

Validates the identity token supplied by the client.

Method Details

Activate() public method

Activates the session and binds it to the current secure channel.
public Activate ( OperationContext context, List clientSoftwareCertificates, UserIdentityToken identityToken, IUserIdentity identity, IUserIdentity effectiveIdentity, StringCollection localeIds, byte serverNonce ) : bool
context OperationContext
clientSoftwareCertificates List
identityToken UserIdentityToken
identity IUserIdentity
effectiveIdentity IUserIdentity
localeIds StringCollection
serverNonce byte
return bool

Close() public method

Closes a session and removes itself from the address space.
public Close ( ) : void
return void

Dispose() public method

Frees any unmanaged resources.
public Dispose ( ) : void
return void

Dispose() protected method

An overrideable version of the Dispose.
protected Dispose ( bool disposing ) : void
disposing bool
return void

IsSecureChannelValid() public method

Checks if the secure channel is currently valid.
public IsSecureChannelValid ( string secureChannelId ) : bool
secureChannelId string
return bool

RestoreContinuationPoint() public method

Restores a continuation point for a session.
The caller is responsible for disposing the continuation point returned.
public RestoreContinuationPoint ( byte continuationPoint ) : ContinuationPoint
continuationPoint byte
return ContinuationPoint

RestoreHistoryContinuationPoint() public method

Restores a previously saves history continuation point.
public RestoreHistoryContinuationPoint ( byte continuationPoint ) : object
continuationPoint byte The identifier for the continuation point.
return object

SaveContinuationPoint() public method

Saves a continuation point for a session.
If the session has too many continuation points the oldest one is dropped.
public SaveContinuationPoint ( ContinuationPoint continuationPoint ) : void
continuationPoint ContinuationPoint
return void

SaveHistoryContinuationPoint() public method

Saves a continuation point used for historical reads.
If the continuationPoint implements IDisposable it will be disposed when the Session is closed or discarded.
public SaveHistoryContinuationPoint ( System.Guid id, object continuationPoint ) : void
id System.Guid The identifier for the continuation point.
continuationPoint object The continuation point.
return void

UpdateLocaleIds() public method

Updates the requested locale ids.
public UpdateLocaleIds ( StringCollection localeIds ) : bool
localeIds StringCollection
return bool

ValidateBeforeActivate() public method

Activates the session and binds it to the current secure channel.
public ValidateBeforeActivate ( OperationContext context, SignatureData clientSignature, List clientSoftwareCertificates, ExtensionObject userIdentityToken, SignatureData userTokenSignature, StringCollection localeIds, byte serverNonce, UserIdentityToken &identityToken, UserTokenPolicy &userTokenPolicy ) : void
context OperationContext
clientSignature SignatureData
clientSoftwareCertificates List
userIdentityToken ExtensionObject
userTokenSignature SignatureData
localeIds StringCollection
serverNonce byte
identityToken UserIdentityToken
userTokenPolicy UserTokenPolicy
return void

ValidateRequest() public method

Validates the request.
public ValidateRequest ( RequestHeader requestHeader, RequestType requestType ) : void
requestHeader RequestHeader
requestType RequestType
return void