Skip to main content

ServerInfo

Struct ServerInfo 

Source
pub struct ServerInfo {
Show 22 fields pub application_uri: UAString, pub product_uri: UAString, pub application_name: LocalizedText, pub start_time: ArcSwap<DateTime>, pub servers: Vec<String>, pub config: Arc<ServerConfig>, pub server_certificate: Option<X509>, pub server_pkey: Option<PrivateKey>, pub state: ArcSwap<ServerState>, pub send_buffer_size: usize, pub receive_buffer_size: usize, pub authenticator: Arc<dyn AuthManager>, pub type_tree: Arc<RwLock<DefaultTypeTree>>, pub type_tree_getter: Arc<dyn TypeTreeForUser>, pub subscription_id_handle: AtomicHandle, pub monitored_item_id_handle: AtomicHandle, pub secure_channel_id_handle: Arc<AtomicHandle>, pub capabilities: ServerCapabilities, pub service_level: Arc<AtomicU8>, pub port: AtomicU16, pub type_loaders: RwLock<TypeLoaderCollection>, pub diagnostics: ServerDiagnostics, /* private fields */
}
Expand description

Server state is any configuration associated with the server as a whole that individual sessions might be interested in.

Fields§

§application_uri: UAString

The application URI

§product_uri: UAString

The product URI

§application_name: LocalizedText

The application name

§start_time: ArcSwap<DateTime>

The time the server started

§servers: Vec<String>

The list of servers (by urn)

§config: Arc<ServerConfig>

Server configuration

§server_certificate: Option<X509>

Server public certificate read from config location or null if there is none

§server_pkey: Option<PrivateKey>

Server private key

§state: ArcSwap<ServerState>

Current state

§send_buffer_size: usize

Audit log Diagnostic information Size of the send buffer in bytes

§receive_buffer_size: usize

Size of the receive buffer in bytes

§authenticator: Arc<dyn AuthManager>

Authenticator to use when verifying user identities, and checking for user access.

§type_tree: Arc<RwLock<DefaultTypeTree>>

Structure containing type metadata shared by the entire server.

§type_tree_getter: Arc<dyn TypeTreeForUser>

Wrapper to get a type tree for a specific user.

§subscription_id_handle: AtomicHandle

Generator for subscription IDs.

§monitored_item_id_handle: AtomicHandle

Generator for monitored item IDs.

§secure_channel_id_handle: Arc<AtomicHandle>

Generator for secure channel IDs.

§capabilities: ServerCapabilities

Server capabilities

§service_level: Arc<AtomicU8>

Service level observer.

§port: AtomicU16

Currently active local port.

§type_loaders: RwLock<TypeLoaderCollection>

List of active type loaders

§diagnostics: ServerDiagnostics

Current server diagnostics.

Implementations§

Source§

impl ServerInfo

Source

pub fn endpoints( &self, endpoint_url: &UAString, transport_profile_uris: &Option<Vec<UAString>>, ) -> Option<Vec<EndpointDescription>>

Get the list of endpoints that match the provided filters.

Source

pub fn endpoint_exists( &self, endpoint_url: &str, security_policy: SecurityPolicy, security_mode: MessageSecurityMode, ) -> bool

Check if the endpoint given by endpoint_url, security_policy, and security_mode exists on the server.

Source

pub fn new_endpoint_descriptions( &self, endpoint_url: &str, ) -> Option<Vec<EndpointDescription>>

Make matching endpoint descriptions for the specified url. If none match then None will be passed, therefore if Some is returned it will be guaranteed to contain at least one result.

Source

pub fn discovery_urls(&self) -> Option<Vec<UAString>>

Get the list of discovery URLs on the server.

Source

pub fn application_type(&self) -> ApplicationType

Get the application type, will be Server.

Source

pub fn gateway_server_uri(&self) -> UAString

Get the gateway server URI.

Source

pub fn state(&self) -> ServerStateType

Get the current server state.

Source

pub fn is_running(&self) -> bool

Check if the server state indicates the server is running.

Source

pub fn base_endpoint(&self) -> String

Get the base endpoint, i.e. the configured host + current port.

Source

pub fn server_certificate_as_byte_string(&self) -> ByteString

Get the server certificate as a byte string.

Source

pub fn registered_server(&self) -> RegisteredServer

Get a representation of this server as a RegisteredServer object.

Source

pub async fn authenticate_endpoint( &self, request: &ActivateSessionRequest, endpoint_url: &str, security_policy: SecurityPolicy, security_mode: MessageSecurityMode, user_identity_token: ExtensionObject, server_nonce: &ByteString, ) -> Result<UserToken, Error>

Authenticates access to an endpoint. The endpoint is described by its path, policy, mode and the token is supplied in an extension object that must be extracted and authenticated.

It is possible that the endpoint does not exist, or that the token is invalid / unsupported or that the token cannot be used with the end point. The return codes reflect the responses that ActivateSession would expect from a service call.

Source

pub fn decoding_options(&self) -> DecodingOptions

Returns the decoding options of the server

Source

pub fn add_type_loader(&self, type_loader: Arc<dyn TypeLoader>)

Add a type loader to the server. Note that there is no mechanism to ensure uniqueness, you should avoid adding the same type loader more than once, it will work, but there will be a small performance overhead.

Source

pub fn summary(&self) -> &ServerDiagnosticsSummary

Convenience method to get the diagnostics summary.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoAnyArc for T
where T: Send + Sync + 'static,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Upcast to Arc<dyn Any>.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more