![]() |
Diffusion Apple API 6.11.5
Unified Client Library for iOS, tvOS and OS X / macOS
|
A Remote Server builder.
A builder of this type is used to create instances of PTDiffusionRemoteServer
that can be supplied to createRemoteServer:
.
Instance Methods | |
(instancetype) | - reset |
(instancetype) | - principal: |
(instancetype) | - credentials: |
(instancetype) | - connectionOptions: |
(instancetype) | - connectionOption:withValue: |
(instancetype) | - missingTopicNotificationFilter: |
(PTDiffusionRemoteServer *) | - createWithName:andURL: |
(PTDiffusionSecondaryInitiatorRemoteServer *) | - createSecondaryInitiatorWithName:andURL: |
Builds a secondary initiator using the current values known to this builder. | |
(PTDiffusionPrimaryInitiatorRemoteServer *) | - createPrimaryInitiatorWithName:urls:andConnector: |
Builds a secondary initiator using the current values known to this builder. | |
(PTDiffusionSecondaryAcceptorRemoteServer *) | - createSecondaryAcceptorWithName:andPrimaryHostName: |
Builds a secondary acceptor using the current values known to this builder. | |
- (instancetype) connectionOption: | (PTDiffusionRemoteServerConnectionOption *) | option | |
withValue: | (NSString *_Nullable) | value | |
Specifies a single connection option.
This will add to the options currently specified to the builder, or replace a value if it has already been specified.
option | the connection option. |
value | the connection option value or null to remove the option. |
- (instancetype) connectionOptions: | (NSDictionary< PTDiffusionRemoteServerConnectionOption *, NSString * > *_Nullable) | connectionOptions |
Specifies a map of PTDiffusionRermoteServerConnectionOption
settings.
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 PTDiffusionRemoteServerBuilder#connectionOption:withValue:
then all options will take their default values.
connectionOptions | the map of options. |
- (PTDiffusionPrimaryInitiatorRemoteServer *) createPrimaryInitiatorWithName: | (NSString *) | name | |
urls: | (NSArray< NSString * > *) | urls | |
andConnector: | (NSString *) | connector | |
Builds a secondary initiator using the current values known to this builder.
name | the remote server name. This is the name that will be specified in topic views. |
url | the URL to use to connect to the primary server. |
- (PTDiffusionSecondaryAcceptorRemoteServer *) createSecondaryAcceptorWithName: | (NSString *) | name | |
andPrimaryHostName: | (NSString *) | primaryHostName | |
Builds a secondary acceptor using the current values known to this builder.
name | the remote server name. A primary initiator of the same name will be able to connect to this acceptor. This is the name that will be specified in topic views. |
primaryHostName | the primary server host name that will be used in SSL validation of the primary server. |
- (PTDiffusionSecondaryInitiatorRemoteServer *) createSecondaryInitiatorWithName: | (NSString *) | name | |
andURL: | (NSString *) | url | |
Builds a secondary initiator using the current values known to this builder.
name | the name of the primary initiator which must correspond to the name of a PTDiffusionSecondaryAcceptorRemoteServer defined on the secondary server. |
urls | the list of URLs to use to initiate connections to the secondary servers. |
connector | the name of the connector used to establish the connection with the secondary server. |
- (PTDiffusionRemoteServer *) createWithName: | (NSString *) | name | |
andURL: | (NSString *) | url | |
Creates a remote server object using the current values known to this builder.
name | the name of the remote server. |
url | the URL to use to connect to the primary server. |
For backwards compatibility this method is retained for secondary initiator compatibility but will be removed at a future release.
- (instancetype) credentials: | (PTDiffusionCredentials *_Nullable) | credentials |
Specifies the credentials to use when connecting to the primary server.
The default, if not specified, is PTDiffusionCredentials.noCredentials
.
credentials | the credentials to use. |
- (instancetype) missingTopicNotificationFilter: | (NSString *_Nullable) | filter |
Specifies a topic selector expression which will filter missing topic notifications propagated from secondary to primary servers.
PTDiffusionMissingTopicNotification
s 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 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.
filter | a topic selector expression specifying the filter to apply or null to remove any existing filter. |
- (instancetype) principal: | (NSString *_Nullable) | principal |
Specifies the name of a principal used by the remote server to connect to the primary server.
The default, if not specified, is the anonymous principal.
principal | principal name of a zero length string to indicate an anonymous connection. |
- (instancetype) reset |
Reset the builder.