C# 클래스 Opc.Ua.ServerBase

A base class for a UA server implementation.
상속: IServerBase, IDisposable
파일 보기 프로젝트 열기: OPCFoundation/UA-.NET 1 사용 예제들

공개 메소드들

메소드 설명
Dispose ( ) : void

Frees any unmanaged resources.

GetEndpoints ( ) : EndpointDescriptionCollection

Returns the endpoints supported by the server.

RequireEncryption ( EndpointDescription description ) : bool

Specifies if the server requires encryption; if so the server needs to send its certificate to the clients and validate the client certificates

ScheduleIncomingRequest ( IEndpointIncomingRequest request ) : void

Schedules an incoming request.

ServerBase ( ) : System

Initializes object with default values.

Start ( ApplicationConfiguration configuration ) : ServiceHost

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

Start ( ApplicationConfiguration configuration ) : void

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

보호된 메소드들

메소드 설명
CreateHttpsServiceHost ( ServiceHost>.IDictionary hosts, ApplicationConfiguration configuration, BindingFactory bindingFactory, IList baseAddresses, ApplicationDescription serverDescription, List securityPolicies ) : List

Create a new service host for UA HTTPS.

CreateResponse ( RequestHeader requestHeader, Exception exception ) : ResponseHeader

Creates the response header.

CreateResponse ( RequestHeader requestHeader, StringTable stringTable ) : ResponseHeader

Creates the response header.

CreateResponse ( RequestHeader requestHeader, uint statusCode ) : ResponseHeader

Creates the response header.

CreateServiceHost ( ServerBase server ) : ServiceHost

Creates an instance of the service host.

CreateSinglePolicyServiceHost ( ServiceHost>.IDictionary hosts, ApplicationConfiguration configuration, BindingFactory bindingFactory, IList baseAddresses, ApplicationDescription serverDescription, MessageSecurityMode securityMode, string securityPolicyUri, string basePath ) : List

Create a new service host for protocols that support only one policy per host.

CreateUaTcpServiceHost ( ServiceHost>.IDictionary hosts, ApplicationConfiguration configuration, BindingFactory bindingFactory, IList baseAddresses, ApplicationDescription serverDescription, List securityPolicies ) : List

Create a new service host for UA TCP.

Dispose ( bool disposing ) : void

An overrideable version of the Dispose.

FilterByEndpointUrl ( Uri endpointUrl, IList baseAddresses ) : IList

Filters the list of addresses by the URL that the client provided.

FilterByProfile ( StringCollection profileUris, IList baseAddresses ) : IList

Filters the list of addresses by profile.

GetDiscoveryUrls ( ) : StringCollection

Returns the discovery URLs for the server.

GetEndpointInstance ( ServerBase server ) : EndpointBase

Returns an instance of the endpoint to use.

GetServiceContract ( ) : Type

Returns the service contract to use.

GetUserTokenPolicies ( ApplicationConfiguration configuration, EndpointDescription description ) : UserTokenPolicyCollection

Returns the UserTokenPolicies supported by the server.

InitializeRequestQueue ( ApplicationConfiguration configuration ) : void

Initializes the request queue.

InitializeServiceHosts ( ApplicationConfiguration configuration, BindingFactory bindingFactory, ApplicationDescription &serverDescription, EndpointDescriptionCollection &endpoints ) : IList

Creates the endpoints and creates the hosts.

LoadServerProperties ( ) : ServerProperties

Returns the properties for associated with the server instance.

NormalizeHostname ( string hostname ) : string

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

OnServerStarting ( ApplicationConfiguration configuration ) : void

Called before the server starts.

OnServerStopping ( ) : void

Called before the server stops

OnUpdateConfiguration ( ApplicationConfiguration configuration ) : void

Called when the server configuration is changed on disk.

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

ProcessRequest ( IEndpointIncomingRequest request, object calldata ) : void

Processes the request.

StartApplication ( ApplicationConfiguration configuration ) : void

Starts the server application.

TranslateApplicationDescription ( Uri clientUrl, ApplicationDescription description, IList baseAddresses, Opc.Ua.LocalizedText applicationName ) : ApplicationDescription

Translates the discovery URLs based on the client url and returns an updated ApplicationDescription.

TranslateEndpointDescriptions ( Uri clientUrl, IList baseAddresses, IList endpoints, ApplicationDescription application ) : EndpointDescriptionCollection

Translates the endpoint descriptions based on the client url and profiles provided.

ValidateRequest ( RequestHeader requestHeader ) : void

Verifies that the request header is valid.

비공개 메소드들

메소드 설명
GetBestDiscoveryUrl ( Uri clientUrl, BaseAddress baseAddress ) : string

Returns the best discovery URL for the base address based on the URL used by the client.

InitializeBaseAddresses ( ApplicationConfiguration configuration ) : void

Initializes the list of base addresses.

Stop ( ) : void

메소드 상세

CreateHttpsServiceHost() 보호된 메소드

Create a new service host for UA HTTPS.
protected CreateHttpsServiceHost ( ServiceHost>.IDictionary hosts, ApplicationConfiguration configuration, BindingFactory bindingFactory, IList baseAddresses, ApplicationDescription serverDescription, List securityPolicies ) : List
hosts ServiceHost>.IDictionary
configuration ApplicationConfiguration
bindingFactory BindingFactory
baseAddresses IList
serverDescription ApplicationDescription
securityPolicies List
리턴 List

CreateResponse() 보호된 메소드

Creates the response header.
protected CreateResponse ( RequestHeader requestHeader, Exception exception ) : ResponseHeader
requestHeader RequestHeader The object that contains description for the RequestHeader DataType.
exception System.Exception The exception used to create DiagnosticInfo assigned to the ServiceDiagnostics.
리턴 ResponseHeader

CreateResponse() 보호된 메소드

Creates the response header.
protected CreateResponse ( RequestHeader requestHeader, StringTable stringTable ) : ResponseHeader
requestHeader RequestHeader The object that contains description for the RequestHeader DataType.
stringTable StringTable The thread safe table of string constants.
리턴 ResponseHeader

CreateResponse() 보호된 메소드

Creates the response header.
If statusCode is bad.
protected CreateResponse ( RequestHeader requestHeader, uint statusCode ) : ResponseHeader
requestHeader RequestHeader The object that contains description for the RequestHeader DataType.
statusCode uint The status code.
리턴 ResponseHeader

CreateServiceHost() 보호된 메소드

Creates an instance of the service host.
protected CreateServiceHost ( ServerBase server ) : ServiceHost
server ServerBase
리턴 ServiceHost

CreateSinglePolicyServiceHost() 보호된 메소드

Create a new service host for protocols that support only one policy per host.
protected CreateSinglePolicyServiceHost ( ServiceHost>.IDictionary hosts, ApplicationConfiguration configuration, BindingFactory bindingFactory, IList baseAddresses, ApplicationDescription serverDescription, MessageSecurityMode securityMode, string securityPolicyUri, string basePath ) : List
hosts ServiceHost>.IDictionary The hosts.
configuration ApplicationConfiguration The configuration.
bindingFactory BindingFactory The binding factory.
baseAddresses IList The base addresses.
serverDescription ApplicationDescription The server description.
securityMode MessageSecurityMode The security mode.
securityPolicyUri string The security policy URI.
basePath string The base path to use when constructing the hosts.
리턴 List

CreateUaTcpServiceHost() 보호된 메소드

Create a new service host for UA TCP.
protected CreateUaTcpServiceHost ( ServiceHost>.IDictionary hosts, ApplicationConfiguration configuration, BindingFactory bindingFactory, IList baseAddresses, ApplicationDescription serverDescription, List securityPolicies ) : List
hosts ServiceHost>.IDictionary
configuration ApplicationConfiguration
bindingFactory BindingFactory
baseAddresses IList
serverDescription ApplicationDescription
securityPolicies List
리턴 List

Dispose() 공개 메소드

Frees any unmanaged resources.
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

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

FilterByEndpointUrl() 보호된 메소드

Filters the list of addresses by the URL that the client provided.
protected FilterByEndpointUrl ( Uri endpointUrl, IList baseAddresses ) : IList
endpointUrl System.Uri
baseAddresses IList
리턴 IList

FilterByProfile() 보호된 메소드

Filters the list of addresses by profile.
protected FilterByProfile ( StringCollection profileUris, IList baseAddresses ) : IList
profileUris StringCollection
baseAddresses IList
리턴 IList

GetDiscoveryUrls() 보호된 메소드

Returns the discovery URLs for the server.
protected GetDiscoveryUrls ( ) : StringCollection
리턴 StringCollection

GetEndpointInstance() 보호된 메소드

Returns an instance of the endpoint to use.
protected GetEndpointInstance ( ServerBase server ) : EndpointBase
server ServerBase
리턴 EndpointBase

GetEndpoints() 공개 메소드

Returns the endpoints supported by the server.
public GetEndpoints ( ) : EndpointDescriptionCollection
리턴 EndpointDescriptionCollection

GetServiceContract() 보호된 메소드

Returns the service contract to use.
protected GetServiceContract ( ) : Type
리턴 System.Type

GetUserTokenPolicies() 보호된 메소드

Returns the UserTokenPolicies supported by the server.
protected GetUserTokenPolicies ( ApplicationConfiguration configuration, EndpointDescription description ) : UserTokenPolicyCollection
configuration ApplicationConfiguration The configuration.
description EndpointDescription The description.
리턴 UserTokenPolicyCollection

InitializeRequestQueue() 보호된 메소드

Initializes the request queue.
protected InitializeRequestQueue ( ApplicationConfiguration configuration ) : void
configuration ApplicationConfiguration The configuration.
리턴 void

InitializeServiceHosts() 보호된 메소드

Creates the endpoints and creates the hosts.
protected InitializeServiceHosts ( ApplicationConfiguration configuration, BindingFactory bindingFactory, ApplicationDescription &serverDescription, EndpointDescriptionCollection &endpoints ) : IList
configuration ApplicationConfiguration The object that stores the configurable configuration information for a UA application.
bindingFactory BindingFactory The object of a class that manages a mapping between a URL scheme and a binding.
serverDescription ApplicationDescription The object of the class that contains a description for the ApplicationDescription DataType.
endpoints EndpointDescriptionCollection The collection of objects.
리턴 IList

LoadServerProperties() 보호된 메소드

Returns the properties for associated with the server instance.
protected LoadServerProperties ( ) : ServerProperties
리턴 ServerProperties

NormalizeHostname() 보호된 메소드

Checks for IP address or well known hostnames that map to the computer.
protected NormalizeHostname ( string hostname ) : string
hostname string The hostname.
리턴 string

OnServerStarting() 보호된 메소드

Called before the server starts.
protected OnServerStarting ( ApplicationConfiguration configuration ) : void
configuration ApplicationConfiguration The object that stores the configurable configuration information for a UA application.
리턴 void

OnServerStopping() 보호된 메소드

Called before the server stops
protected OnServerStopping ( ) : void
리턴 void

OnUpdateConfiguration() 보호된 메소드

Called when the server configuration is changed on disk.
Servers are free to ignore changes if it is difficult/impossible to apply them without a restart.
protected OnUpdateConfiguration ( ApplicationConfiguration configuration ) : void
configuration ApplicationConfiguration The object that stores the configurable configuration information for a UA application.
리턴 void

ProcessRequest() 보호된 메소드

Processes the request.
protected ProcessRequest ( IEndpointIncomingRequest request, object calldata ) : void
request IEndpointIncomingRequest The request.
calldata object The calldata passed with the request.
리턴 void

RequireEncryption() 공개 정적인 메소드

Specifies if the server requires encryption; if so the server needs to send its certificate to the clients and validate the client certificates
public static RequireEncryption ( EndpointDescription description ) : bool
description EndpointDescription The description.
리턴 bool

ScheduleIncomingRequest() 공개 메소드

Schedules an incoming request.
public ScheduleIncomingRequest ( IEndpointIncomingRequest request ) : void
request IEndpointIncomingRequest The request.
리턴 void

ServerBase() 공개 메소드

Initializes object with default values.
public ServerBase ( ) : System
리턴 System

Start() 공개 메소드

Starts the server (called from a IIS host process).
public Start ( ApplicationConfiguration configuration ) : ServiceHost
configuration ApplicationConfiguration The object that stores the configurable configuration information /// for a UA application
리턴 ServiceHost

Start() 공개 메소드

Starts the server (called from a dedicated host process).
public Start ( ApplicationConfiguration configuration ) : void
configuration ApplicationConfiguration The object that stores the configurable configuration /// information for a UA application. ///
리턴 void

StartApplication() 보호된 메소드

Starts the server application.
protected StartApplication ( ApplicationConfiguration configuration ) : void
configuration ApplicationConfiguration The object that stores the configurable configuration information for a UA application.
리턴 void

TranslateApplicationDescription() 보호된 메소드

Translates the discovery URLs based on the client url and returns an updated ApplicationDescription.
protected TranslateApplicationDescription ( Uri clientUrl, ApplicationDescription description, IList baseAddresses, Opc.Ua.LocalizedText applicationName ) : ApplicationDescription
clientUrl System.Uri The client URL.
description ApplicationDescription The application description.
baseAddresses IList The base addresses.
applicationName Opc.Ua.LocalizedText The localized application name.
리턴 ApplicationDescription

TranslateEndpointDescriptions() 보호된 메소드

Translates the endpoint descriptions based on the client url and profiles provided.
protected TranslateEndpointDescriptions ( Uri clientUrl, IList baseAddresses, IList endpoints, ApplicationDescription application ) : EndpointDescriptionCollection
clientUrl System.Uri The client URL.
baseAddresses IList The base addresses.
endpoints IList The endpoints.
application ApplicationDescription The application to use with the endpoints.
리턴 EndpointDescriptionCollection

ValidateRequest() 보호된 메소드

Verifies that the request header is valid.
protected ValidateRequest ( RequestHeader requestHeader ) : void
requestHeader RequestHeader The object that contains description for the RequestHeader DataType.
리턴 void