Diffusion C API 6.12.0
Loading...
Searching...
No Matches
Build a Remote Server.

Typedefs

typedef struct DIFFUSION_REMOTE_SERVER_BUILDER_T DIFFUSION_REMOTE_SERVER_BUILDER_T
 Opaque remote server builder struct.

Functions

DIFFUSION_REMOTE_SERVER_BUILDER_Tdiffusion_remote_server_builder_init (void)
 Initialize a new remote server builder.
DIFFUSION_REMOTE_SERVER_BUILDER_Tdiffusion_remote_server_builder_reset (DIFFUSION_REMOTE_SERVER_BUILDER_T *builder)
 Reset the builder.
DIFFUSION_REMOTE_SERVER_BUILDER_Tdiffusion_remote_server_builder_retry_delay (DIFFUSION_REMOTE_SERVER_BUILDER_T *builder, int delay_ms, DIFFUSION_API_ERROR *api_error)
 Specifies the delay after losing a connection before attempting a reconnection.
DIFFUSION_REMOTE_SERVER_BUILDER_Tdiffusion_remote_server_builder_principal (DIFFUSION_REMOTE_SERVER_BUILDER_T *builder, char *principal)
 Specifies the name of a principal used by the remote server to connect to the primary server.
DIFFUSION_REMOTE_SERVER_BUILDER_Tdiffusion_remote_server_builder_credentials (DIFFUSION_REMOTE_SERVER_BUILDER_T *builder, CREDENTIALS_T *credentials)
 Specifies the credentials to use when connecting to the primary server.
DIFFUSION_REMOTE_SERVER_BUILDER_Tdiffusion_remote_server_builder_connection_option (DIFFUSION_REMOTE_SERVER_BUILDER_T *builder, DIFFUSION_REMOTE_SERVER_CONNECTION_OPTION_T option, char *value)
 Specifies a single connection option.
DIFFUSION_REMOTE_SERVER_BUILDER_Tdiffusion_remote_server_builder_connection_options (DIFFUSION_REMOTE_SERVER_BUILDER_T *builder, HASH_NUM_T *connection_options)
 Specifies a map of DIFFUSION_REMOTE_SERVER_CONNECTION_OPTION_T settings.
DIFFUSION_REMOTE_SERVER_BUILDER_Tdiffusion_remote_server_builder_missing_topic_notification_filter (DIFFUSION_REMOTE_SERVER_BUILDER_T *builder, char *filter)
 Specifies a topic selector expression which will filter missing topic notifications propagated from secondary to primary server.
void diffusion_remote_server_builder_free (DIFFUSION_REMOTE_SERVER_BUILDER_T *builder)
 Free a remote server builder.
DIFFUSION_REMOTE_SERVER_Tdiffusion_remote_server_builder_create_primary_initiator (DIFFUSION_REMOTE_SERVER_BUILDER_T *builder, char *name, LIST_T *urls, char *connector, DIFFUSION_API_ERROR *api_error)
 Builds a primary initiator using the current values known to this builder.
DIFFUSION_REMOTE_SERVER_Tdiffusion_remote_server_builder_create_secondary_initiator (DIFFUSION_REMOTE_SERVER_BUILDER_T *builder, char *name, char *url, DIFFUSION_API_ERROR *api_error)
 Builds a secondary initiator using the current values known to this builder.
DIFFUSION_REMOTE_SERVER_Tdiffusion_remote_server_builder_create_secondary_acceptor (DIFFUSION_REMOTE_SERVER_BUILDER_T *builder, char *name, char *primary_host_name, DIFFUSION_API_ERROR *api_error)
 Builds a secondary acceptor using the current values known to this builder.
 DEPRECATED (DIFFUSION_REMOTE_SERVER_T *diffusion_remote_server_builder_create(DIFFUSION_REMOTE_SERVER_BUILDER_T *builder, char *name, char *url, DIFFUSION_API_ERROR *api_error))
 Creates a remote server struct using the current values known to this builder.

Detailed Description

Typedef Documentation

◆ DIFFUSION_REMOTE_SERVER_BUILDER_T

Opaque remote server builder struct.

Since
6.7

Function Documentation

◆ DEPRECATED()

DEPRECATED ( DIFFUSION_REMOTE_SERVER_T * diffusion_remote_server_builder_createDIFFUSION_REMOTE_SERVER_BUILDER_T *builder, char *name, char *url, DIFFUSION_API_ERROR *api_error)

Creates a remote server struct using the current values known to this builder.

Parameters
builderthe remote server builder.
namethe name of the remote server.
urlthe URL to use to connect to the primary server.
api_errorpopulated on API error. Can be NULL.
Returns
a new remote server struct if the operation was successful, NULL otherwise. In this case, if a non-NULL api_error pointer has been provided, this will be populated with the error information and should be freed with diffusion_api_error_free.
Since
6.7
Deprecated
since 6.10 For backwards compatibility this method is retained for secondary initiator compatibility but will be removed at a future release.

◆ diffusion_remote_server_builder_connection_option()

DIFFUSION_REMOTE_SERVER_BUILDER_T * diffusion_remote_server_builder_connection_option ( DIFFUSION_REMOTE_SERVER_BUILDER_T * builder,
DIFFUSION_REMOTE_SERVER_CONNECTION_OPTION_T option,
char * value )

Specifies a single connection option.

This will add to the options currently specified to this builder, or will replace a value if it has already been specified.

Parameters
builderthe remote server builder.
optionthe connection option
valuethe connection option value or NULL to remove the option.
Returns
the remote server builder.
Since
6.7

◆ diffusion_remote_server_builder_connection_options()

DIFFUSION_REMOTE_SERVER_BUILDER_T * diffusion_remote_server_builder_connection_options ( DIFFUSION_REMOTE_SERVER_BUILDER_T * builder,
HASH_NUM_T * connection_options )

Specifies a map of DIFFUSION_REMOTE_SERVER_CONNECTION_OPTION_T settings.

This will replace any options currently set for this builder. Any options not supplied will take their default values. If no connection options are specified, either using this method or diffusion_remote_server_builder_connection_option then all options will take their default value.

Parameters
builderthe remote server builder.
connection_optionsmap of options.
Returns
the remote server builder.
Since
6.7

◆ diffusion_remote_server_builder_create_primary_initiator()

DIFFUSION_REMOTE_SERVER_T * diffusion_remote_server_builder_create_primary_initiator ( DIFFUSION_REMOTE_SERVER_BUILDER_T * builder,
char * name,
LIST_T * urls,
char * connector,
DIFFUSION_API_ERROR * api_error )

Builds a primary initiator using the current values known to this builder.

Parameters
builderthe remote server builder.
namethe name of the primary initiator which must correspond to the name of a Secondary Acceptor Remote Server defined on the secondary server.
urlsthe list of URLs to use to initiate connections to the secondary servers.
connectorthe name of the connector used to establish the connection with the secondary server.
api_errorpopulated on API error. Can be NULL.
Returns
a new primary initiator remote server if the operation was successful, NULL otherwise. In this case, if a non-NULL api_error pointer has been provided, this will be populated with the error information and should be freed with diffusion_api_error_free.
Since
6.10

◆ diffusion_remote_server_builder_create_secondary_acceptor()

DIFFUSION_REMOTE_SERVER_T * diffusion_remote_server_builder_create_secondary_acceptor ( DIFFUSION_REMOTE_SERVER_BUILDER_T * builder,
char * name,
char * primary_host_name,
DIFFUSION_API_ERROR * api_error )

Builds a secondary acceptor using the current values known to this builder.

Parameters
builderthe remote server builder.
namethe 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.
primary_host_namethe primary server host name that will be used in SSL validation of the primary server
api_errorpopulated on API error. Can be NULL.
Returns
a new secondary initiator remote server if the operation was successful, NULL otherwise. In this case, if a non-NULL api_error pointer has been provided, this will be populated with the error information and should be freed with diffusion_api_error_free.
Since
6.10

◆ diffusion_remote_server_builder_create_secondary_initiator()

DIFFUSION_REMOTE_SERVER_T * diffusion_remote_server_builder_create_secondary_initiator ( DIFFUSION_REMOTE_SERVER_BUILDER_T * builder,
char * name,
char * url,
DIFFUSION_API_ERROR * api_error )

Builds a secondary initiator using the current values known to this builder.

Parameters
builderthe remote server builder.
namethe remote server name. This is the name that will be specified in topic views.
urlthe URL to use to connect to the primary server.
api_errorpopulated on API error. Can be NULL.
Returns
a new secondary initiator remote server if the operation was successful, NULL otherwise. In this case, if a non-NULL api_error pointer has been provided, this will be populated with the error information and should be freed with diffusion_api_error_free.
Since
6.10

◆ diffusion_remote_server_builder_credentials()

DIFFUSION_REMOTE_SERVER_BUILDER_T * diffusion_remote_server_builder_credentials ( DIFFUSION_REMOTE_SERVER_BUILDER_T * builder,
CREDENTIALS_T * credentials )

Specifies the credentials to use when connecting to the primary server.

The default, if not specified, is NONE.

Parameters
builderthe remote server builder.
credentialsthe credentials to use.
Returns
the remote server builder.
Since
6.7

◆ diffusion_remote_server_builder_free()

void diffusion_remote_server_builder_free ( DIFFUSION_REMOTE_SERVER_BUILDER_T * builder)

Free a remote server builder.

Parameters
builderthe remote server builder.
Since
6.7

◆ diffusion_remote_server_builder_init()

DIFFUSION_REMOTE_SERVER_BUILDER_T * diffusion_remote_server_builder_init ( void )

Initialize a new remote server builder.

diffusion_remote_server_builder_free should be called on this pointer when no longer needed.

Returns
the remote server builder.
Since
6.7

◆ diffusion_remote_server_builder_missing_topic_notification_filter()

DIFFUSION_REMOTE_SERVER_BUILDER_T * diffusion_remote_server_builder_missing_topic_notification_filter ( DIFFUSION_REMOTE_SERVER_BUILDER_T * builder,
char * filter )

Specifies a topic selector expression which will filter missing topic notifications propagated from secondary to primary server.

Missing topic notifications are notified when a client subscribes using a topic selector that matches no existing topics. By specifying a missing topic selector 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 expressions *.* 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.

Parameters
builderthe remote server builder.
filtera topic selector expression specifying the filter to apply, or NULL to remove any existing filter.
Returns
the remote server builder.
Since
6.7

◆ diffusion_remote_server_builder_principal()

DIFFUSION_REMOTE_SERVER_BUILDER_T * diffusion_remote_server_builder_principal ( DIFFUSION_REMOTE_SERVER_BUILDER_T * builder,
char * 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.

Parameters
builderthe remote server builder.
principalprincipal name or a zero length string to indicate an anonymous connection.
Returns
the remote server builder.
Since
6.7

◆ diffusion_remote_server_builder_reset()

DIFFUSION_REMOTE_SERVER_BUILDER_T * diffusion_remote_server_builder_reset ( DIFFUSION_REMOTE_SERVER_BUILDER_T * builder)

Reset the builder.

Parameters
builderthe remote server builder.
Returns
the remote server builder.
Since
6.7

◆ diffusion_remote_server_builder_retry_delay()

DIFFUSION_REMOTE_SERVER_BUILDER_T * diffusion_remote_server_builder_retry_delay ( DIFFUSION_REMOTE_SERVER_BUILDER_T * builder,
int delay_ms,
DIFFUSION_API_ERROR * api_error )

Specifies the delay after losing a connection before attempting a reconnection.

The value is specified in milliseconds. Default 1000 (1 second).

For DIFFUSION_REMOTE_SERVER_PRIMARY_INITIATOR_T remote servers only.

Parameters
builderthe remote server builder.
delaydelay in milliseconds after losing a connection before attempting a reconnection.
api_errorpopulated on API error. Can be NULL.
Returns
the remote server builder, if the operation was successful, NULL otherwise. In this case, if a non-NULL api_error pointer has been provided, this will be populated with the error information and should be freed with diffusion_api_error_free.
the remote server builder.
Since
6.10