.NET Based OPC UA Client/Server SDK  3.0.10.493
UnifiedAutomation.UaClient.SessionMethodHelper Class Reference

This is a base class that manages a session used to call methods on the server. More...

Inherits IDisposable.

Inherited by UnifiedAutomation.UaClient.CertificateDirectoryClient, UnifiedAutomation.UaClient.DataTypeManager, UnifiedAutomation.UaClient.FileDirectoryModel, UnifiedAutomation.UaClient.FileModel, UnifiedAutomation.UaClient.ModelManager, UnifiedAutomation.UaClient.ServerConfigurationClient, and UnifiedAutomation.UaClient.TrustListManagement.

Public Member Functions

 SessionMethodHelper (ApplicationInstanceBase application)
 Initializes a new instance of the SessionMethodHelper class. More...
 
 SessionMethodHelper (Session session)
 Initializes a new instance of the SessionMethodHelper class. More...
 
void Dispose ()
 Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. More...
 
void Connect (int timeout)
 Connects to the server. More...
 
void BeginConnect (AsyncCallback callback, object callbackData)
 Connects to the server. More...
 
void Disconnect ()
 Disconnects from the server. More...
 

Protected Member Functions

virtual void Dispose (bool disposing)
 Releases unmanaged and—optionally—managed resources. More...
 
UserIdentity RequestAdminCredentials ()
 Gets the admin credentials. More...
 

Properties

string EndpointUrl [get, set]
 Gets or sets the endpoint URL. More...
 
Session Session [get]
 Gets the session. More...
 
RequestSettings DefaultRequestSettings [get, set]
 Gets or sets the default request settings. More...
 
int DefaultTimeout [get]
 Gets the default timeout. More...
 
UserIdentity AdminCredentials [get, set]
 Gets or sets the administrator credentials. More...
 
bool IsConnected [get]
 Gets a value indicating whether a connection to the server is active. More...
 
bool MustCloseSession [get]
 A flag indicating that the object created the session and therefore must close it. More...
 

Events

EventHandler ServerStatusChanged
 Occurs when the server status changes. More...
 
EventHandler
< CredentialsRequiredEventArgs
AdminCredentialsRequired
 Raised when admin credentials are required. More...
 

Detailed Description

This is a base class that manages a session used to call methods on the server.

It can be used to create subclasses that provide a proper API for method calls.

Constructor & Destructor Documentation

UnifiedAutomation.UaClient.SessionMethodHelper.SessionMethodHelper ( ApplicationInstanceBase  application)
inline

Initializes a new instance of the SessionMethodHelper class.

Parameters
applicationThe application.
Exceptions
System.ArgumentNullExceptionapplication

Any session created will be disposed when the FileModel is disposed.

UnifiedAutomation.UaClient.SessionMethodHelper.SessionMethodHelper ( Session  session)
inline

Initializes a new instance of the SessionMethodHelper class.

Parameters
sessionThe session.
Exceptions
System.ArgumentNullExceptionsession

The session will not be disposed when the FileModel is disposed.

Member Function Documentation

void UnifiedAutomation.UaClient.SessionMethodHelper.BeginConnect ( AsyncCallback  callback,
object  callbackData 
)
inline

Connects to the server.

Exceptions
System.ArgumentNullExceptionAn endpoint must be provided before connecting.
void UnifiedAutomation.UaClient.SessionMethodHelper.Connect ( int  timeout)
inline

Connects to the server.

Parameters
timeoutHow long (in milliseconds) to wait for the connection to be established. 0 means wait forever.
Exceptions
System.TimeoutExceptionThrown if the timeout expires before the connection is made.
void UnifiedAutomation.UaClient.SessionMethodHelper.Disconnect ( )
inline

Disconnects from the server.

void UnifiedAutomation.UaClient.SessionMethodHelper.Dispose ( )
inline

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

virtual void UnifiedAutomation.UaClient.SessionMethodHelper.Dispose ( bool  disposing)
inlineprotectedvirtual

Releases unmanaged and—optionally—managed resources.

Parameters
disposingtrue to release both managed and unmanaged resources; false to release only unmanaged resources.
UserIdentity UnifiedAutomation.UaClient.SessionMethodHelper.RequestAdminCredentials ( )
inlineprotected

Gets the admin credentials.

Returns
The administrator credentials.
Exceptions
System.InvalidOperationExceptionThe operation requires administrator credentials.

Property Documentation

UserIdentity UnifiedAutomation.UaClient.SessionMethodHelper.AdminCredentials
getset

Gets or sets the administrator credentials.

RequestSettings UnifiedAutomation.UaClient.SessionMethodHelper.DefaultRequestSettings
getset

Gets or sets the default request settings.

int UnifiedAutomation.UaClient.SessionMethodHelper.DefaultTimeout
get

Gets the default timeout.

string UnifiedAutomation.UaClient.SessionMethodHelper.EndpointUrl
getset

Gets or sets the endpoint URL.

bool UnifiedAutomation.UaClient.SessionMethodHelper.IsConnected
get

Gets a value indicating whether a connection to the server is active.

true if a connection to the server is active; otherwise, false.

bool UnifiedAutomation.UaClient.SessionMethodHelper.MustCloseSession
getprotected

A flag indicating that the object created the session and therefore must close it.

Session UnifiedAutomation.UaClient.SessionMethodHelper.Session
get

Gets the session.

Event Documentation

EventHandler<CredentialsRequiredEventArgs> UnifiedAutomation.UaClient.SessionMethodHelper.AdminCredentialsRequired

Raised when admin credentials are required.

EventHandler UnifiedAutomation.UaClient.SessionMethodHelper.ServerStatusChanged

Occurs when the server status changes.


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