.NET Based OPC UA Client/Server SDK  3.3.3.537
UnifiedAutomation.UaServer.Session Class Reference

A generic session manager object for a server. More...

Inherits IDisposable, and UnifiedAutomation.UaBase.IMapperContext.

Public Member Functions

 Session (RequestContext context, ICertificate serverCertificate, NodeId authenticationToken, byte[] serverNonce, string sessionName, ApplicationDescription clientDescription, string endpointUrl, ICertificate clientCertificate, double sessionTimeout, uint maxResponseMessageSize, double maxRequestAge, uint maxBrowseContinuationPoints, uint maxHistoryContinuationPoints, uint maxQueryContinuationPoints)
 Initializes the session. More...
 
void Dispose ()
 Frees any unmanaged resources. More...
 
bool CheckIfExpired (uint minSessionTimeout)
 Check if the session timeout has elapsed since the last communication from the client. More...
 
virtual void ValidateRequest (RequestHeader requestHeader, ServiceType requestType)
 Validates the request. More...
 
virtual void ValidateRequestContext (RequestContext request)
 Validates the request. More...
 
void RequestStarted (RequestContext context)
 Saves a request that has started. More...
 
void RequestComplete (RequestContext context)
 Removes a request once it completes. More...
 
List< RequestContextCancelRequests (uint requestHandle)
 Cancels the requests. More...
 
virtual bool IsSecureChannelValid (string secureChannelId)
 Checks if the secure channel is currently valid. More...
 
bool UpdateLocaleIds (StringCollection localeIds)
 Updates the requested locale ids. More...
 
void ValidateBeforeActivate (RequestContext context, SignatureData clientSignature, List< SignedSoftwareCertificate > clientSoftwareCertificates, ExtensionObject userIdentityToken, SignatureData userTokenSignature, StringCollection localeIds, byte[] serverNonce, out UserIdentityToken identityToken, out UserTokenPolicy userTokenPolicy)
 Activates the session and binds it to the current secure channel. More...
 
bool Activate (RequestContext context, List< SignedSoftwareCertificate > clientSoftwareCertificates, UserIdentityToken identityToken, UserIdentity identity, UserIdentity effectiveIdentity, StringCollection localeIds, byte[] serverNonce)
 Activates the session and binds it to the current secure channel. More...
 
void Close ()
 Closes a session and removes itself from the address space. More...
 
void SaveContinuationPoint (ContinuationPoint continuationPoint)
 Saves a continuation point for a session. More...
 
ContinuationPoint RestoreContinuationPoint (byte[] continuationPoint)
 Restores a continuation point for a session. More...
 
void SaveQueryContinuationPoint (QueryContinuationPoint continuationPoint)
 Saves a continuation point for a session. More...
 
QueryContinuationPoint RestoreQueryContinuationPoint (byte[] continuationPoint)
 Restores a continuation point for a session. More...
 
void SaveHistoryContinuationPoint (HistoryContinuationPoint continuationPoint)
 Saves a continuation point used for historical reads. More...
 
HistoryContinuationPoint RestoreHistoryContinuationPoint (byte[] continuationPoint)
 Restores a previously saves history continuation point. More...
 
RegisteredNode RegisterNode (NodeId nodeId)
 Registers the node. More...
 
RegisteredNode FindRegisteredNode (NodeId nodeId)
 Finds the registered node. More...
 
void UnregisterNode (NodeId nodeId)
 Unregisters the node. More...
 

Protected Member Functions

virtual void Dispose (bool disposing)
 An overrideable version of the Dispose. More...
 

Properties

ServerManager Server [get]
 Gets the server. More...
 
NodeId Id [get]
 The identifier assigned to the session when it was created. More...
 
uint SessionScopeId [get, set]
 The ScopeId used for Session and Subscription diagnostics nodes. More...
 
UserIdentity Identity [get]
 The user identity provided by the client. More...
 
UserIdentity EffectiveIdentity [get]
 The application defined mapping for user identity provided by the client. More...
 
UserIdentityToken IdentityToken [get]
 The user identity token provided by the client. More...
 
object DiagnosticsLock [get]
 A lock which must be acquired before accessing the diagnostics. More...
 
SessionDiagnosticsObjectModel SessionDiagnostics [get]
 The diagnostics associated with the session. More...
 
NodeId SubscriptionDiagnosticsArrayNodeId [get]
 Gets the subscription diagnostics array node id. More...
 
string SessionName [get]
 Gets the SessionName. More...
 
ICertificate ClientCertificate [get]
 The application instance certificate associated with the client. More...
 
string[] PreferredLocales [get]
 The locales requested when the session was created. More...
 
bool Activated [get]
 Whether the session has been activated. More...
 

Detailed Description

A generic session manager object for a server.

Constructor & Destructor Documentation

UnifiedAutomation.UaServer.Session.Session ( RequestContext  context,
ICertificate  serverCertificate,
NodeId  authenticationToken,
byte[]  serverNonce,
string  sessionName,
ApplicationDescription  clientDescription,
string  endpointUrl,
ICertificate  clientCertificate,
double  sessionTimeout,
uint  maxResponseMessageSize,
double  maxRequestAge,
uint  maxBrowseContinuationPoints,
uint  maxHistoryContinuationPoints,
uint  maxQueryContinuationPoints 
)

Initializes the session.

Member Function Documentation

bool UnifiedAutomation.UaServer.Session.Activate ( RequestContext  context,
List< SignedSoftwareCertificate clientSoftwareCertificates,
UserIdentityToken  identityToken,
UserIdentity  identity,
UserIdentity  effectiveIdentity,
StringCollection  localeIds,
byte[]  serverNonce 
)

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

List<RequestContext> UnifiedAutomation.UaServer.Session.CancelRequests ( uint  requestHandle)

Cancels the requests.

Parameters
requestHandleThe request handle.
Returns
The number of requests canceled.
bool UnifiedAutomation.UaServer.Session.CheckIfExpired ( uint  minSessionTimeout)

Check if the session timeout has elapsed since the last communication from the client.

Parameters
minSessionTimeoutThe timeout to use if the session has not been activated.
Returns
TRUE if the session has expired; FALSE otherwise.
void UnifiedAutomation.UaServer.Session.Close ( )

Closes a session and removes itself from the address space.

void UnifiedAutomation.UaServer.Session.Dispose ( )

Frees any unmanaged resources.

virtual void UnifiedAutomation.UaServer.Session.Dispose ( bool  disposing)
protectedvirtual

An overrideable version of the Dispose.

RegisteredNode UnifiedAutomation.UaServer.Session.FindRegisteredNode ( NodeId  nodeId)

Finds the registered node.

Parameters
nodeIdThe node id.
Returns
virtual bool UnifiedAutomation.UaServer.Session.IsSecureChannelValid ( string  secureChannelId)
virtual

Checks if the secure channel is currently valid.

RegisteredNode UnifiedAutomation.UaServer.Session.RegisterNode ( NodeId  nodeId)

Registers the node.

Parameters
nodeIdThe node id.
Returns
void UnifiedAutomation.UaServer.Session.RequestComplete ( RequestContext  context)

Removes a request once it completes.

Parameters
contextThe request context.
void UnifiedAutomation.UaServer.Session.RequestStarted ( RequestContext  context)

Saves a request that has started.

Parameters
contextThe request context.
ContinuationPoint UnifiedAutomation.UaServer.Session.RestoreContinuationPoint ( byte[]  continuationPoint)

Restores a continuation point for a session.

The caller is responsible for disposing the continuation point returned.

HistoryContinuationPoint UnifiedAutomation.UaServer.Session.RestoreHistoryContinuationPoint ( byte[]  continuationPoint)

Restores a previously saves history continuation point.

Parameters
continuationPointThe identifier for the continuation point.
Returns
The save continuation point. null if not found.
QueryContinuationPoint UnifiedAutomation.UaServer.Session.RestoreQueryContinuationPoint ( byte[]  continuationPoint)

Restores a continuation point for a session.

The caller is responsible for disposing the continuation point returned.

void UnifiedAutomation.UaServer.Session.SaveContinuationPoint ( ContinuationPoint  continuationPoint)

Saves a continuation point for a session.

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

void UnifiedAutomation.UaServer.Session.SaveHistoryContinuationPoint ( HistoryContinuationPoint  continuationPoint)

Saves a continuation point used for historical reads.

Parameters
continuationPointThe continuation point.

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

void UnifiedAutomation.UaServer.Session.SaveQueryContinuationPoint ( QueryContinuationPoint  continuationPoint)

Saves a continuation point for a session.

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

void UnifiedAutomation.UaServer.Session.UnregisterNode ( NodeId  nodeId)

Unregisters the node.

Parameters
nodeIdThe node id.
bool UnifiedAutomation.UaServer.Session.UpdateLocaleIds ( StringCollection  localeIds)

Updates the requested locale ids.

Returns
true if the new locale ids are different from the old locale ids.
void UnifiedAutomation.UaServer.Session.ValidateBeforeActivate ( RequestContext  context,
SignatureData  clientSignature,
List< SignedSoftwareCertificate clientSoftwareCertificates,
ExtensionObject  userIdentityToken,
SignatureData  userTokenSignature,
StringCollection  localeIds,
byte[]  serverNonce,
out UserIdentityToken  identityToken,
out UserTokenPolicy  userTokenPolicy 
)

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

virtual void UnifiedAutomation.UaServer.Session.ValidateRequest ( RequestHeader  requestHeader,
ServiceType  requestType 
)
virtual

Validates the request.

This validation happens before the actual request context is created.

virtual void UnifiedAutomation.UaServer.Session.ValidateRequestContext ( RequestContext  request)
virtual

Validates the request.

This validation happens just before the request execution starts.

Property Documentation

bool UnifiedAutomation.UaServer.Session.Activated
get

Whether the session has been activated.

ICertificate UnifiedAutomation.UaServer.Session.ClientCertificate
get

The application instance certificate associated with the client.

object UnifiedAutomation.UaServer.Session.DiagnosticsLock
get

A lock which must be acquired before accessing the diagnostics.

UserIdentity UnifiedAutomation.UaServer.Session.EffectiveIdentity
get

The application defined mapping for user identity provided by the client.

NodeId UnifiedAutomation.UaServer.Session.Id
get

The identifier assigned to the session when it was created.

UserIdentity UnifiedAutomation.UaServer.Session.Identity
get

The user identity provided by the client.

UserIdentityToken UnifiedAutomation.UaServer.Session.IdentityToken
get

The user identity token provided by the client.

string [] UnifiedAutomation.UaServer.Session.PreferredLocales
get

The locales requested when the session was created.

ServerManager UnifiedAutomation.UaServer.Session.Server
get

Gets the server.

SessionDiagnosticsObjectModel UnifiedAutomation.UaServer.Session.SessionDiagnostics
get

The diagnostics associated with the session.

string UnifiedAutomation.UaServer.Session.SessionName
get

Gets the SessionName.

uint UnifiedAutomation.UaServer.Session.SessionScopeId
getset

The ScopeId used for Session and Subscription diagnostics nodes.

NodeId UnifiedAutomation.UaServer.Session.SubscriptionDiagnosticsArrayNodeId
get

Gets the subscription diagnostics array node id.


The documentation for this class was generated from the following file: