UA Bundle SDK .NET  2.2.3.276
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Groups Pages
UnifiedAutomation.UaBase.ServerBase Class Reference

A base class for a UA server implementation. More...

Inherits UnifiedAutomation.UaBase.IServerBase, and IDisposable.

Inherited by UnifiedAutomation.UaBase.DiscoveryServerBase, and UnifiedAutomation.UaBase.SessionServerBase.

Classes

class  RequestQueue
 Manages a queue of requests. More...
 

Public Member Functions

 ServerBase ()
 Initializes object with default values. More...
 
void Dispose ()
 Frees any unmanaged resources. More...
 
void ScheduleIncomingRequest (IEndpointIncomingRequest request)
 Schedules an incoming request. More...
 
ApplicationLicense GetProductLicense ()
 Gets the application license. More...
 
void Start (ApplicationInstance application)
 Starts the server (called from a dedicated host process). More...
 
virtual void Stop ()
 Stops the server and releases all resources. More...
 
void RunInThreadPool (ThreadPoolEventHandler callback, object request)
 Runs an operation the in server thread pool. More...
 

Protected Member Functions

virtual void Dispose (bool disposing)
 An overrideable version of the Dispose. More...
 
void InitializeRequestQueue (ApplicationInstance configuration)
 Initializes the request queue. More...
 
virtual void DispatchRequest (IEndpointIncomingRequest request)
 Schedules an incoming request. More...
 
virtual ServiceHost CreateServiceHost (ServerBase server, params Uri[] addresses)
 Creates an instance of the service host. More...
 
virtual Type GetServiceContract ()
 Returns the service contract to use. More...
 
virtual EndpointBase GetEndpointInstance (ServerBase server)
 Returns an instance of the endpoint to use. More...
 
List< ServiceHostCreateServiceHosts (ApplicationInstance application)
 Create a new WCF service host for protocols that require a WCF service host. More...
 
ITransportListener CreateUaTcpListener (ApplicationInstance application)
 Creates the UA TCP listener. More...
 
ITransportListener CreateHttpsListener (ApplicationInstance application)
 Creates the HTTPS listener. More...
 
virtual void ValidateRequest (RequestHeader requestHeader)
 Verifies that the request header is valid. More...
 
virtual ResponseHeader CreateResponse (RequestHeader requestHeader, uint statusCode)
 Creates the response header. More...
 
virtual void OnUpdateConfiguration (ApplicationInstance configuration)
 Called when the server configuration is changed on disk. More...
 
virtual void OnServerStarting (ApplicationInstance configuration)
 Called before the server starts. More...
 
virtual List< StatusCodeInitializeServices (ApplicationInstance application)
 Creates the endpoints and creates the hosts. More...
 
virtual void StartApplication (ApplicationInstance configuration)
 Starts the server application. More...
 
virtual void OnServerStopping ()
 Called before the server stops More...
 
virtual void ProcessRequest (IEndpointIncomingRequest request)
 Processes the request. More...
 
string NormalizeHostname (string hostname)
 Checks for IP address or well known hostnames that map to the computer. More...
 
ApplicationDescription GetApplicationDescription (Uri clientUrl, ApplicationDescription description, LocalizedText applicationName)
 Gets the application description. More...
 
EndpointDescriptionCollection GetEndpointDescriptions (Uri clientUrl, ApplicationDescription application)
 Gets the endpoint descriptions. More...
 

Properties

ApplicationInstance Application [get]
 Gets the application. More...
 
MessageContext MessageContext [get]
 The message context to use with the service. More...
 
StatusCode ServerError [get]
 An error condition that describes why the server if not running (null if no error exists). More...
 
IEnumerable< ServiceHostWcfServiceHosts [get]
 Gets the list of WCF service hosts used by the server instance. More...
 
IEnumerable< ITransportListenerTransportListeners [get]
 Gets the list of transport listeners used by the server instance. More...
 
- Properties inherited from UnifiedAutomation.UaBase.IServerBase
ApplicationInstance Application [get]
 Gets the application. More...
 
MessageContext MessageContext [get]
 The message context to use with the service. More...
 
StatusCode ServerError [get]
 An error condition that describes why the server if not running (null if no error exists). More...
 

Detailed Description

A base class for a UA server implementation.

Constructor & Destructor Documentation

UnifiedAutomation.UaBase.ServerBase.ServerBase ( )
inline

Initializes object with default values.

Member Function Documentation

ITransportListener UnifiedAutomation.UaBase.ServerBase.CreateHttpsListener ( ApplicationInstance  application)
inlineprotected

Creates the HTTPS listener.

Parameters
applicationThe application.
virtual ResponseHeader UnifiedAutomation.UaBase.ServerBase.CreateResponse ( RequestHeader  requestHeader,
uint  statusCode 
)
inlineprotectedvirtual

Creates the response header.

Parameters
requestHeaderThe object that contains description for the RequestHeader DataType.
statusCodeThe status code.
Exceptions
StatusExceptionIf statusCode is bad.
Returns
Returns a description for the ResponseHeader DataType.
virtual ServiceHost UnifiedAutomation.UaBase.ServerBase.CreateServiceHost ( ServerBase  server,
params Uri[]  addresses 
)
inlineprotectedvirtual

Creates an instance of the service host.

List<ServiceHost> UnifiedAutomation.UaBase.ServerBase.CreateServiceHosts ( ApplicationInstance  application)
inlineprotected

Create a new WCF service host for protocols that require a WCF service host.

Parameters
applicationThe application.
Returns
Returns list of descriptions for the EndpointDescription DataType, return type is list of
See Also
EndpointDescription
.
ITransportListener UnifiedAutomation.UaBase.ServerBase.CreateUaTcpListener ( ApplicationInstance  application)
inlineprotected

Creates the UA TCP listener.

Parameters
applicationThe application.
virtual void UnifiedAutomation.UaBase.ServerBase.DispatchRequest ( IEndpointIncomingRequest  request)
inlineprotectedvirtual

Schedules an incoming request.

Parameters
requestThe request.

Reimplemented in UnifiedAutomation.UaServer.ServerManager.

void UnifiedAutomation.UaBase.ServerBase.Dispose ( )
inline

Frees any unmanaged resources.

virtual void UnifiedAutomation.UaBase.ServerBase.Dispose ( bool  disposing)
inlineprotectedvirtual

An overrideable version of the Dispose.

Reimplemented in UnifiedAutomation.UaServer.ServerManager.

ApplicationDescription UnifiedAutomation.UaBase.ServerBase.GetApplicationDescription ( Uri  clientUrl,
ApplicationDescription  description,
LocalizedText  applicationName 
)
inlineprotected

Gets the application description.

Parameters
clientUrlThe client URL.
descriptionThe description.
applicationNameName of the application.
Returns
EndpointDescriptionCollection UnifiedAutomation.UaBase.ServerBase.GetEndpointDescriptions ( Uri  clientUrl,
ApplicationDescription  application 
)
inlineprotected

Gets the endpoint descriptions.

Parameters
clientUrlThe client URL.
applicationThe application.
Returns
virtual EndpointBase UnifiedAutomation.UaBase.ServerBase.GetEndpointInstance ( ServerBase  server)
inlineprotectedvirtual

Returns an instance of the endpoint to use.

ApplicationLicense UnifiedAutomation.UaBase.ServerBase.GetProductLicense ( )
inline

Gets the application license.

virtual Type UnifiedAutomation.UaBase.ServerBase.GetServiceContract ( )
inlineprotectedvirtual

Returns the service contract to use.

void UnifiedAutomation.UaBase.ServerBase.InitializeRequestQueue ( ApplicationInstance  configuration)
inlineprotected

Initializes the request queue.

Parameters
configurationThe configuration.
virtual List<StatusCode> UnifiedAutomation.UaBase.ServerBase.InitializeServices ( ApplicationInstance  application)
inlineprotectedvirtual

Creates the endpoints and creates the hosts.

Parameters
applicationThe application.
Returns
Returns list of hosts for a WCF services.
string UnifiedAutomation.UaBase.ServerBase.NormalizeHostname ( string  hostname)
inlineprotected

Checks for IP address or well known hostnames that map to the computer.

Parameters
hostnameThe hostname.
Returns
The hostname to use for URL filtering.
virtual void UnifiedAutomation.UaBase.ServerBase.OnServerStarting ( ApplicationInstance  configuration)
inlineprotectedvirtual

Called before the server starts.

Parameters
configurationThe object that stores the configurable configuration information for a UA application.

Reimplemented in UnifiedAutomation.UaServer.ServerManager.

virtual void UnifiedAutomation.UaBase.ServerBase.OnServerStopping ( )
inlineprotectedvirtual

Called before the server stops

Reimplemented in UnifiedAutomation.UaServer.ServerManager.

virtual void UnifiedAutomation.UaBase.ServerBase.OnUpdateConfiguration ( ApplicationInstance  configuration)
inlineprotectedvirtual

Called when the server configuration is changed on disk.

Parameters
configurationThe object that stores the configurable configuration information for a UA application.

Servers are free to ignore changes if it is difficult/impossible to apply them without a restart.

virtual void UnifiedAutomation.UaBase.ServerBase.ProcessRequest ( IEndpointIncomingRequest  request)
inlineprotectedvirtual

Processes the request.

Parameters
requestThe request.
void UnifiedAutomation.UaBase.ServerBase.RunInThreadPool ( ThreadPoolEventHandler  callback,
object  request 
)
inline

Runs an operation the in server thread pool.

Parameters
requestThe request.
callbackThe callback.
void UnifiedAutomation.UaBase.ServerBase.ScheduleIncomingRequest ( IEndpointIncomingRequest  request)
inline

Schedules an incoming request.

Parameters
requestThe request.

Implements UnifiedAutomation.UaBase.IServerBase.

void UnifiedAutomation.UaBase.ServerBase.Start ( ApplicationInstance  application)
inline

Starts the server (called from a dedicated host process).

Parameters
applicationThe application.
virtual void UnifiedAutomation.UaBase.ServerBase.StartApplication ( ApplicationInstance  configuration)
inlineprotectedvirtual

Starts the server application.

Parameters
configurationThe object that stores the configurable configuration information for a UA application.
virtual void UnifiedAutomation.UaBase.ServerBase.Stop ( )
inlinevirtual

Stops the server and releases all resources.

Reimplemented in UnifiedAutomation.UaServer.ServerManager.

virtual void UnifiedAutomation.UaBase.ServerBase.ValidateRequest ( RequestHeader  requestHeader)
inlineprotectedvirtual

Verifies that the request header is valid.

Parameters
requestHeaderThe object that contains description for the RequestHeader DataType.

Property Documentation

ApplicationInstance UnifiedAutomation.UaBase.ServerBase.Application
get

Gets the application.

MessageContext UnifiedAutomation.UaBase.ServerBase.MessageContext
get

The message context to use with the service.

The message context that stores context information associated with a UA server that is used during message processing.

StatusCode UnifiedAutomation.UaBase.ServerBase.ServerError
get

An error condition that describes why the server if not running (null if no error exists).

The object that combines the status code and diagnostic info structures.

IEnumerable<ITransportListener> UnifiedAutomation.UaBase.ServerBase.TransportListeners
getprotected

Gets the list of transport listeners used by the server instance.

The transport listeners.

IEnumerable<ServiceHost> UnifiedAutomation.UaBase.ServerBase.WcfServiceHosts
getprotected

Gets the list of WCF service hosts used by the server instance.

The WCF service hosts.


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