.NET Based OPC UA Client/Server SDK  3.0.10.493
UnifiedAutomation.UaServer.SessionManager Class Reference

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

Inherits UnifiedAutomation.UaServer.ISessionManager, and IDisposable.

Public Member Functions

 SessionManager (ServerManager server, SessionLimits limits)
 Initializes the manager with its configuration. More...
 
void Dispose ()
 Frees any unmanaged resources. More...
 
virtual void Startup ()
 Starts the session manager. More...
 
virtual void Shutdown ()
 Stops the session manager and closes all sessions. More...
 
virtual Session CreateSession (RequestContext context, ICertificate serverCertificate, string sessionName, byte[] clientNonce, ApplicationDescription clientDescription, string endpointUrl, ICertificate clientCertificate, double requestedSessionTimeout, uint maxResponseMessageSize, out NodeId sessionId, out NodeId authenticationToken, out byte[] serverNonce, out double revisedSessionTimeout)
 Creates a new session. More...
 
virtual bool ActivateSession (RequestContext context, NodeId authenticationToken, SignatureData clientSignature, List< SignedSoftwareCertificate > clientSoftwareCertificates, ExtensionObject userIdentityToken, SignatureData userTokenSignature, StringCollection localeIds, out byte[] serverNonce)
 Activates an existing session More...
 
virtual void CloseSession (NodeId sessionId)
 Closes the specifed session. More...
 
virtual RequestContext ValidateRequest (RequestHeader requestHeader, ServiceType requestType)
 Validates request header and returns a request context. More...
 
List< SessionGetSessions (RequestContext context)
 Returns all of the sessions known to the session manager. More...
 

Protected Member Functions

virtual void Dispose (bool disposing)
 An overrideable version of the Dispose. More...
 
virtual Session CreateSession (RequestContext context, ICertificate serverCertificate, NodeId sessionCookie, byte[] serverNonce, string sessionName, ApplicationDescription clientDescription, string endpointUrl, ICertificate clientCertificate, double sessionTimeout, uint maxResponseMessageSize)
 Creates a new instance of a session. More...
 
virtual void RaiseSessionEvent (Session session, SessionEventReason reason)
 Raises an event related to a session. More...
 

Properties

SessionLimits SessionLimits [get]
 Gets the session limits (must not be modified by the called). More...
 
SessionEventHandler SessionCreated
 
SessionEventHandler SessionActivated
 
SessionEventHandler SessionClosing
 
ImpersonateEventHandler ImpersonateUser
 Callback to validate UserIdentitoken passed in ActivateSession. More...
 

Additional Inherited Members

- Events inherited from UnifiedAutomation.UaServer.ISessionManager
SessionEventHandler SessionCreated
 Raised after a new session is created. More...
 
SessionEventHandler SessionActivated
 Raised whenever a session is activated and the user identity or preferred locales changed. More...
 
SessionEventHandler SessionClosing
 Raised before a session is closed. More...
 
ImpersonateEventHandler ImpersonateUser
 Raised before the user identity for a session is changed. More...
 

Detailed Description

A generic session manager object for a server.

Constructor & Destructor Documentation

UnifiedAutomation.UaServer.SessionManager.SessionManager ( ServerManager  server,
SessionLimits  limits 
)
inline

Initializes the manager with its configuration.

Member Function Documentation

virtual bool UnifiedAutomation.UaServer.SessionManager.ActivateSession ( RequestContext  context,
NodeId  authenticationToken,
SignatureData  clientSignature,
List< SignedSoftwareCertificate clientSoftwareCertificates,
ExtensionObject  userIdentityToken,
SignatureData  userTokenSignature,
StringCollection  localeIds,
out byte[]  serverNonce 
)
inlinevirtual

Activates an existing session

virtual void UnifiedAutomation.UaServer.SessionManager.CloseSession ( NodeId  sessionId)
inlinevirtual

Closes the specifed session.

This method should not throw an exception if the session no longer exists.

virtual Session UnifiedAutomation.UaServer.SessionManager.CreateSession ( RequestContext  context,
ICertificate  serverCertificate,
string  sessionName,
byte[]  clientNonce,
ApplicationDescription  clientDescription,
string  endpointUrl,
ICertificate  clientCertificate,
double  requestedSessionTimeout,
uint  maxResponseMessageSize,
out NodeId  sessionId,
out NodeId  authenticationToken,
out byte[]  serverNonce,
out double  revisedSessionTimeout 
)
inlinevirtual

Creates a new session.

virtual Session UnifiedAutomation.UaServer.SessionManager.CreateSession ( RequestContext  context,
ICertificate  serverCertificate,
NodeId  sessionCookie,
byte[]  serverNonce,
string  sessionName,
ApplicationDescription  clientDescription,
string  endpointUrl,
ICertificate  clientCertificate,
double  sessionTimeout,
uint  maxResponseMessageSize 
)
inlineprotectedvirtual

Creates a new instance of a session.

void UnifiedAutomation.UaServer.SessionManager.Dispose ( )
inline

Frees any unmanaged resources.

virtual void UnifiedAutomation.UaServer.SessionManager.Dispose ( bool  disposing)
inlineprotectedvirtual

An overrideable version of the Dispose.

List<Session> UnifiedAutomation.UaServer.SessionManager.GetSessions ( RequestContext  context)
inline

Returns all of the sessions known to the session manager.

Parameters
contextThe request context.
Returns
A list of the sessions.

Implements UnifiedAutomation.UaServer.ISessionManager.

virtual void UnifiedAutomation.UaServer.SessionManager.RaiseSessionEvent ( Session  session,
SessionEventReason  reason 
)
inlineprotectedvirtual

Raises an event related to a session.

virtual void UnifiedAutomation.UaServer.SessionManager.Shutdown ( )
inlinevirtual

Stops the session manager and closes all sessions.

virtual void UnifiedAutomation.UaServer.SessionManager.Startup ( )
inlinevirtual

Starts the session manager.

virtual RequestContext UnifiedAutomation.UaServer.SessionManager.ValidateRequest ( RequestHeader  requestHeader,
ServiceType  requestType 
)
inlinevirtual

Validates request header and returns a request context.

This method verifies that the session id valid and that it uses secure channel id associated with with current thread. It also verifies that the timestamp is not too and that the sequence number is not out of order (update requests only).

Property Documentation

ImpersonateEventHandler UnifiedAutomation.UaServer.SessionManager.ImpersonateUser
addremove

Callback to validate UserIdentitoken passed in ActivateSession.

SessionLimits UnifiedAutomation.UaServer.SessionManager.SessionLimits
get

Gets the session limits (must not be modified by the called).

The session limits.


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