Interface IRemoteServerBuilder
Interface for a remote server builder. Since 6.7.
A builder of this type may be created using NewRemoteServerBuilder() and used to create instances of IRemoteServer that can be supplied to CreateRemoteServerAsync(IRemoteServer).
Namespace: PushTechnology.ClientInterface.Client.Features.Control.Clients
Assembly: Diffusion.Client.dll
Syntax
public interface IRemoteServerBuilder
Methods
ConnectionOption(RemoteServerConnectionOption, String)
Specifies a single connection option.
Declaration
IRemoteServerBuilder ConnectionOption(RemoteServerConnectionOption connectionOption, string value)
Parameters
Type | Name | Description |
---|---|---|
RemoteServerConnectionOption | connectionOption | The connection option. |
String | value | The connection option value or null to remove the option |
Returns
Type | Description |
---|---|
IRemoteServerBuilder | This builder. |
Remarks
This will add to the options currently specified to the builder, or replace a value if it has already been specified.
ConnectionOptions(Dictionary<RemoteServerConnectionOption, String>)
Specifies a dictionary of RemoteServerConnectionOption settings.
Declaration
IRemoteServerBuilder ConnectionOptions(Dictionary<RemoteServerConnectionOption, string> connectionOptions)
Parameters
Type | Name | Description |
---|---|---|
Dictionary<RemoteServerConnectionOption, String> | connectionOptions | Dictionary of options. |
Returns
Type | Description |
---|---|
IRemoteServerBuilder | This builder. |
Remarks
This will replace any options currently set for the builder.
Any options not supplied will take their default values.
If no connection options are specified, either using this method or ConnectionOption(RemoteServerConnectionOption, String) then all options will take their default value.
Create(String, String)
Creates a remote server object using the current values known to this builder.
Declaration
IRemoteServer Create(string name, string url)
Parameters
Type | Name | Description |
---|---|---|
String | name | The name of the remote server. |
String | url | The URL to use to connect to the primary server. |
Returns
Type | Description |
---|---|
IRemoteServer | A new remote server instance. |
Credentials(ICredentials)
Specifies the credentials to use when connecting to the primary server.
Declaration
IRemoteServerBuilder Credentials(ICredentials credentials)
Parameters
Type | Name | Description |
---|---|---|
ICredentials | credentials | The credentials to use. |
Returns
Type | Description |
---|---|
IRemoteServerBuilder | This builder. |
Remarks
The default, if not specified, is PushTechnology.DiffusionCore.Client.Types.Credentials.NO_CREDENTIALS.
MissingTopicNotificationFilter(String)
Specifies a topic selector expression which will filter missing topic notifications propagated from secondary to primary server.
Declaration
IRemoteServerBuilder MissingTopicNotificationFilter(string filter)
Parameters
Type | Name | Description |
---|---|---|
String | filter | A topic selector expression specifying the filter to apply or null to remove any existing filter. |
Returns
Type | Description |
---|---|
IRemoteServerBuilder | This builder. |
Remarks
IMissingTopicNotifications are notified when a client subscribes using a topic selector that matches no existing topics. By specifying a missing topic notification filter all notifications that match the filter on the secondary server will be propagated to the primary server.
A match occurs if the path prefix of the subscription selector matches the path prefix of the specified selector. If the selector is a SELECTOR_SET_PREFIX selector set then the notification will be propagated if it matches any selector in the set.
If no filter is specified then no missing topic notifications will be propagated.
The special selector expression "*.*" may be used to indicate that all missing topic notifications should be propagated.
Only the path prefix of the specified selector(s) is considered when matching therefore any use of regular expressions would be ignored.
Principal(String)
Specifies the name of a principal used by the remote server to connect to the primary server.
Declaration
IRemoteServerBuilder Principal(string principal)
Parameters
Type | Name | Description |
---|---|---|
String | principal | Principal name or a zero length string to indicate an anonymous connection. |
Returns
Type | Description |
---|---|
IRemoteServerBuilder | This builder. |
Remarks
The default, if not specified, is the anonymous principal.
Reset()
Resets the builder.
Declaration
IRemoteServerBuilder Reset()
Returns
Type | Description |
---|---|
IRemoteServerBuilder | This builder. |