A class to assist with information if a server is available or not. More...
Public Member Functions | |
| void | Close () |
| Close background thread. | |
| void | Dispose () |
| Dispose internal resources. | |
| void | Init () |
| Initialize and start checking if connection is available. | |
| ServerMonitor (bool secureOnly, Uri uri, string username, SecureString password, bool adUser) | |
| Constructor for creating a monitor using its own login session. If incorrect credentials are provided the monitor will report the server as not connected and further information can be found in the. | |
| ServerMonitor (bool secureOnly, Uri uri, string username, string password, bool adUser) | |
| Constructor for creating a monitor using its own login session. If incorrect credentials are provided the monitor will report the server as not connected and further information can be found in the. | |
| ServerMonitor (Uri uri) | |
| Using this constructor will cause the ServerMonitor to use the already logged in user. | |
| ServerMonitor (Uri uri, string username, SecureString password, bool adUser) | |
| Constructor for creating a monitor using its own login session. If incorrect credentials are provided the monitor will report the server as not connected and further information can be found in the. | |
| ServerMonitor (Uri uri, string username, string password, bool adUser) | |
| Constructor for creating a monitor using its own login session. If incorrect credentials are provided the monitor will report the server as not connected and further information can be found in the. | |
Static Public Attributes | |
| const int | DefPollInterval = 15 |
| Default poll interval in seconds. | |
| const int | MinPollInterval = 5 |
| Minimum allowed poll interval in seconds. | |
Protected Member Functions | |
| virtual void | Dispose (bool disposing) |
| Dispose internal resources. | |
Properties | |
| bool | IsConnected [get, set] |
| Identifies if the server is available for login. | |
| Exception | LastException [get] |
| Any exception occurred during the check is stored in this property. | |
| int | PollInterval [get, set] |
| The pause interval between checks. The default value is DefPollInterval. The minimum allowed is MinPollInterval. Note that when server is down, additional time between checks occur depending on various timeouts on the network. | |
| bool | Running [get] |
| Tells if this check function in this class is running. | |
| ServerId | ServerId [get] |
| Provides the ID of the server being monitored. | |
| Uri | Uri [get] |
| The URI as provided during initialization, possibly modified to be correct. | |
Events | |
| ConnectionStateChangedEventHandler | ConnectionStateChangedEvent |
| You can register on this event, if you need to know when the session to the Event Server is changing. When receiving the event call, check the IsConnected property for the actual state. | |
A class to assist with information if a server is available or not.
This class does not add the server into the different environments, but simply informs if it is available.
|
inline |
Using this constructor will cause the ServerMonitor to use the already logged in user.
Note: For this constructor to work, EnvironmentManager.LoginNetworkCredential and EnvironmentManager.LoginAuthType properties must be set on EnvironmentManager.Instance.
| uri | URI of the server to monitor |
| InvalidCredentialsMIPException | No valid login session was found |
|
inline |
Constructor for creating a monitor using its own login session. If incorrect credentials are provided the monitor will report the server as not connected and further information can be found in the.
property.
Please consider using the more secure version using SecureString for the password instead.
| uri | URI of the server to monitor |
| username | User name - must be valid on the server |
| password | Password |
| adUser | Set to false if provided user is a Basic user, otherwise set to true |
|
inline |
Constructor for creating a monitor using its own login session. If incorrect credentials are provided the monitor will report the server as not connected and further information can be found in the.
property.
Please consider using the more secure version using SecureString for the password instead.
| secureOnly | If true, only authentication over https is accepted. Can only be used for server versions 2021 R1 or newer. If false, authentication over both http and https is accepted. Can be used for any server version. |
| uri | URI of the server to monitor |
| username | User name - must be valid on the server |
| password | Password |
| adUser | Set to false if provided user is a Basic user, otherwise set to true |
|
inline |
Constructor for creating a monitor using its own login session. If incorrect credentials are provided the monitor will report the server as not connected and further information can be found in the.
property.
| uri | URI of the server to monitor |
| username | User name - must be valid on the server |
| password | Password |
| adUser | Set to false if provided user is a Basic user, otherwise set to true |
|
inline |
Constructor for creating a monitor using its own login session. If incorrect credentials are provided the monitor will report the server as not connected and further information can be found in the.
property.
| secureOnly | If true, only authentication over https is accepted. Can only be used for server versions 2021 R1 or newer. If false, authentication over both http and https is accepted. Can be used for any server version. |
| uri | URI of the server to monitor |
| username | User name - must be valid on the server |
| password | Password |
| adUser | Set to false if provided user is a Basic user, otherwise set to true |
|
inline |
Close background thread.
|
inline |
Dispose internal resources.
|
inlineprotectedvirtual |
Dispose internal resources.
|
inline |
Initialize and start checking if connection is available.
|
static |
Default poll interval in seconds.
|
static |
Minimum allowed poll interval in seconds.
|
getset |
Identifies if the server is available for login.
|
get |
Any exception occurred during the check is stored in this property.
|
getset |
The pause interval between checks. The default value is DefPollInterval. The minimum allowed is MinPollInterval. Note that when server is down, additional time between checks occur depending on various timeouts on the network.
|
get |
Tells if this check function in this class is running.
|
get |
Provides the ID of the server being monitored.
|
get |
The URI as provided during initialization, possibly modified to be correct.
| ConnectionStateChangedEventHandler VideoOS.Platform.SDK.Util.ServerMonitor.ConnectionStateChangedEvent |
You can register on this event, if you need to know when the session to the Event Server is changing.
When receiving the event call, check the IsConnected property for the actual state.