From 36703ddd1eae9549773cf06917a2f41c5d9d33a4 Mon Sep 17 00:00:00 2001 From: Dimeji Ogunyoye Date: Fri, 19 May 2023 16:20:23 +0100 Subject: [PATCH 1/3] Update Diffusion Examples to 6.8.9 --- .../diffusion/examples/PubSubExample.java | 2 +- c/connect-async.c | 2 +- c/connect-with-user-context.c | 2 +- c/connect.c | 2 +- .../authentication_control/auth-service.c | 2 +- .../client_control/change-roles-with-filter.c | 2 +- .../change-roles-with-session.c | 2 +- c/features/client_control/close-with-filter.c | 2 +- .../client_control/close-with-session.c | 2 +- .../client_control/get-session-properties.c | 2 +- .../session-properties-listener.c | 2 +- c/features/messaging/send-request-to-filter.c | 2 +- c/features/messaging/send-request-to-path.c | 2 +- .../messaging/send-request-to-session.c | 2 +- c/features/metrics/session-metric-collector.c | 2 +- c/features/metrics/topic-metric-collector.c | 2 +- c/features/remote_servers/remote-servers.c | 2 +- c/features/security/change-principal.c | 2 +- c/features/session_trees/session-trees.c | 2 +- .../subscription-control.c | 2 +- .../system-auth-control.c | 2 +- c/features/time_series/time-series-append.c | 2 +- c/features/time_series/time-series-edit.c | 2 +- .../time_series/time-series-range-query.c | 2 +- .../time-series-timestamp-append.c | 2 +- c/features/topic_control/add-topics.c | 2 +- .../missing-topic-notification.c | 2 +- .../topic_update/topic-update-add-and-set.c | 2 +- c/features/topic_update/topic-update-stream.c | 2 +- .../topic-update-with-constraint.c | 2 +- c/features/topic_update/topic-update.c | 2 +- c/features/topic_update/update-record.c | 2 +- c/features/topic_views/topic-views-get.c | 2 +- c/features/topic_views/topic-views-list.c | 2 +- c/features/topic_views/topic-views-remove.c | 2 +- c/features/topic_views/topic-views.c | 2 +- c/features/topics/binary-topics.c | 2 +- c/features/topics/double-topics.c | 2 +- c/features/topics/fetch-request.c | 2 +- c/features/topics/int64-topics.c | 2 +- c/features/topics/recordv2-topics.c | 2 +- c/features/topics/string-topics.c | 2 +- c/features/topics/subscribe-multiple.c | 2 +- c/features/topics/subscribe.c | 2 +- c/reconnect.c | 2 +- dotnet/client-examples.sln | 35 +++++---- dotnet/source/examples/Runner/Runner.csproj | 4 -- java/pom.xml | 4 +- .../examples/ClientConsumingJSONTopics.java | 2 +- .../ClientConsumingRecordV2Topics.java | 2 +- .../examples/ClientConsumingSimpleTopics.java | 2 +- .../ClientConsumingTimeSeriesTopics.java | 2 +- .../ClientCreatingRecordV2Schema.java | 2 +- .../examples/ClientRequestHandling.java | 2 +- .../examples/ClientSimpleSubscriber.java | 2 +- .../examples/ClientUsingCredentials.java | 2 +- .../diffusion/examples/ClientUsingFetch.java | 2 +- .../diffusion/examples/ClientUsingPings.java | 2 +- .../examples/ClientUsingSessionLocks.java | 2 +- .../ClientWithReconnectionStrategy.java | 2 +- .../examples/ControlAuthenticationClient.java | 2 +- .../ControlClientAddingAndRemovingTopics.java | 2 +- .../ControlClientAsExclusiveUpdater.java | 2 +- .../ControlClientChangingSecurity.java | 2 +- ...rolClientChangingSystemAuthentication.java | 2 +- ...ControlClientConnectingAsynchronously.java | 2 +- ...ClientDeletesTopicsWithoutSubscribers.java | 2 +- ...lientHandlingMissingTopicNotification.java | 2 +- .../ControlClientManagingSessionTrees.java | 2 +- .../ControlClientPartiallyUpdatingTopic.java | 2 +- .../ControlClientRequestHandling.java | 2 +- .../ControlClientSubscriptionControl.java | 2 +- ...ntrolClientSubscriptionControlRouting.java | 2 +- .../ControlClientTopicNotifications.java | 2 +- .../ControlClientUpdatingJSONTopics.java | 2 +- ...ntrolClientUpdatingJSONTopicsWithCBOR.java | 2 +- .../ControlClientUpdatingRecordV2Topics.java | 2 +- .../ControlClientUpdatingSimpleTopics.java | 2 +- ...ControlClientUpdatingTimeSeriesTopics.java | 2 +- ...ontrolClientUsingFiltersAndProperties.java | 2 +- .../ControlClientUsingSessionProperties.java | 2 +- ...olClientUsingTopicLifecycleProperties.java | 2 +- .../examples/CreateRemoteTopicView.java | 2 +- .../examples/CreateSecondaryKeys.java | 2 +- .../diffusion/examples/CreateTopicView.java | 2 +- .../examples/TimeSeriesQueryExample.java | 2 +- .../examples/TopicUpdateExample.java | 2 +- .../diffusion/examples/package-info.java | 2 +- .../examples/runnable/AbstractClient.java | 2 +- .../runnable/CompetitiveIncrement.java | 2 +- .../examples/runnable/ConsumingBinary.java | 2 +- .../examples/runnable/ConsumingJson.java | 2 +- .../runnable/CoordinatingSessionExample.java | 2 +- .../examples/runnable/ProducingBinary.java | 2 +- .../examples/runnable/ProducingJson.java | 2 +- .../examples/runnable/RandomData.java | 2 +- .../examples/runnable/ReceivingJson.java | 2 +- .../examples/runnable/SendingJson.java | 2 +- .../examples/runnable/package-info.java | 2 +- .../gettingstarted/PublishingClient.java | 2 +- .../gettingstarted/SubscribingClient.java | 2 +- .../gettingstarted/package-info.java | 2 +- .../diffusion/tutorials/PubSubExample.java | 2 +- .../diffusion/tutorials/package-info.java | 2 +- js/package.json | 2 +- python/examples/connecting/__init__.py | 9 +++ ...al_session_establishment_retry_strategy.py | 71 +++++++++++++++++++ .../examples/messaging/add_request_handler.py | 4 +- .../messaging/send_request_to_filter.py | 4 +- .../messaging/send_request_to_path.py | 4 +- .../messaging/send_request_to_session.py | 4 +- python/examples/metrics/topic_metrics.py | 15 ++-- .../add_and_set_topic_with_constraint.py | 41 +++++++++++ python/examples/topics/add_topic.py | 28 +++++--- .../topics/set_topic_with_constraint.py | 42 +++++++++++ ts/package.json | 4 +- 116 files changed, 325 insertions(+), 148 deletions(-) create mode 100644 python/examples/connecting/__init__.py create mode 100644 python/examples/connecting/initial_session_establishment_retry_strategy.py create mode 100644 python/examples/topics/add_and_set_topic_with_constraint.py create mode 100644 python/examples/topics/set_topic_with_constraint.py diff --git a/android/pubsub/app/src/main/java/com/pushtechnology/diffusion/examples/PubSubExample.java b/android/pubsub/app/src/main/java/com/pushtechnology/diffusion/examples/PubSubExample.java index 6ba3107e..2261c82e 100644 --- a/android/pubsub/app/src/main/java/com/pushtechnology/diffusion/examples/PubSubExample.java +++ b/android/pubsub/app/src/main/java/com/pushtechnology/diffusion/examples/PubSubExample.java @@ -43,7 +43,7 @@ * Start a Diffusion server and the Android emulator on the same machine, then * build and deploy this example to the emulator. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.2 */ public class PubSubExample extends Activity { diff --git a/c/connect-async.c b/c/connect-async.c index d1bd329f..23760788 100644 --- a/c/connect-async.c +++ b/c/connect-async.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.0 */ diff --git a/c/connect-with-user-context.c b/c/connect-with-user-context.c index b68e2f03..49bae63d 100644 --- a/c/connect-with-user-context.c +++ b/c/connect-with-user-context.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.9 */ diff --git a/c/connect.c b/c/connect.c index 33bd58f0..dc348c9f 100644 --- a/c/connect.c +++ b/c/connect.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.0 */ diff --git a/c/features/authentication_control/auth-service.c b/c/features/authentication_control/auth-service.c index 9f93ff63..0c51bc49 100644 --- a/c/features/authentication_control/auth-service.c +++ b/c/features/authentication_control/auth-service.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.0 */ diff --git a/c/features/client_control/change-roles-with-filter.c b/c/features/client_control/change-roles-with-filter.c index 66b46cb2..02f78dba 100644 --- a/c/features/client_control/change-roles-with-filter.c +++ b/c/features/client_control/change-roles-with-filter.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.7 */ diff --git a/c/features/client_control/change-roles-with-session.c b/c/features/client_control/change-roles-with-session.c index 8ce5eb9f..02868f66 100644 --- a/c/features/client_control/change-roles-with-session.c +++ b/c/features/client_control/change-roles-with-session.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.7 */ diff --git a/c/features/client_control/close-with-filter.c b/c/features/client_control/close-with-filter.c index 61207b3b..f885249c 100644 --- a/c/features/client_control/close-with-filter.c +++ b/c/features/client_control/close-with-filter.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.7 */ diff --git a/c/features/client_control/close-with-session.c b/c/features/client_control/close-with-session.c index 6affee99..e03aae88 100644 --- a/c/features/client_control/close-with-session.c +++ b/c/features/client_control/close-with-session.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.7 */ diff --git a/c/features/client_control/get-session-properties.c b/c/features/client_control/get-session-properties.c index 8c83625d..dbfa72ae 100644 --- a/c/features/client_control/get-session-properties.c +++ b/c/features/client_control/get-session-properties.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.6 */ diff --git a/c/features/client_control/session-properties-listener.c b/c/features/client_control/session-properties-listener.c index 07c552fc..65aa17b3 100644 --- a/c/features/client_control/session-properties-listener.c +++ b/c/features/client_control/session-properties-listener.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.6 */ diff --git a/c/features/messaging/send-request-to-filter.c b/c/features/messaging/send-request-to-filter.c index d7121f6f..d6705184 100644 --- a/c/features/messaging/send-request-to-filter.c +++ b/c/features/messaging/send-request-to-filter.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.2 */ diff --git a/c/features/messaging/send-request-to-path.c b/c/features/messaging/send-request-to-path.c index 4de6d287..4c654fb2 100644 --- a/c/features/messaging/send-request-to-path.c +++ b/c/features/messaging/send-request-to-path.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.2 */ diff --git a/c/features/messaging/send-request-to-session.c b/c/features/messaging/send-request-to-session.c index b61e2c18..e3d6c744 100644 --- a/c/features/messaging/send-request-to-session.c +++ b/c/features/messaging/send-request-to-session.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.2 */ diff --git a/c/features/metrics/session-metric-collector.c b/c/features/metrics/session-metric-collector.c index 7624a820..dc1a39cf 100644 --- a/c/features/metrics/session-metric-collector.c +++ b/c/features/metrics/session-metric-collector.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.7 */ diff --git a/c/features/metrics/topic-metric-collector.c b/c/features/metrics/topic-metric-collector.c index 07d8526e..f776443b 100644 --- a/c/features/metrics/topic-metric-collector.c +++ b/c/features/metrics/topic-metric-collector.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.7 */ diff --git a/c/features/remote_servers/remote-servers.c b/c/features/remote_servers/remote-servers.c index 7c2b080c..252668f4 100644 --- a/c/features/remote_servers/remote-servers.c +++ b/c/features/remote_servers/remote-servers.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.7 */ diff --git a/c/features/security/change-principal.c b/c/features/security/change-principal.c index d8c0c392..3386645c 100644 --- a/c/features/security/change-principal.c +++ b/c/features/security/change-principal.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.0 */ diff --git a/c/features/session_trees/session-trees.c b/c/features/session_trees/session-trees.c index 87adf45a..5ab5ae8b 100644 --- a/c/features/session_trees/session-trees.c +++ b/c/features/session_trees/session-trees.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.7 */ diff --git a/c/features/subscription_control/subscription-control.c b/c/features/subscription_control/subscription-control.c index 34f3056e..a1c1db33 100644 --- a/c/features/subscription_control/subscription-control.c +++ b/c/features/subscription_control/subscription-control.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.7 */ diff --git a/c/features/system_authentication_control/system-auth-control.c b/c/features/system_authentication_control/system-auth-control.c index edfe45b0..b6ee6c32 100644 --- a/c/features/system_authentication_control/system-auth-control.c +++ b/c/features/system_authentication_control/system-auth-control.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.5 */ diff --git a/c/features/time_series/time-series-append.c b/c/features/time_series/time-series-append.c index 94e5a3e9..fb30f602 100644 --- a/c/features/time_series/time-series-append.c +++ b/c/features/time_series/time-series-append.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.3 */ diff --git a/c/features/time_series/time-series-edit.c b/c/features/time_series/time-series-edit.c index 0e28ce2a..b055b14e 100644 --- a/c/features/time_series/time-series-edit.c +++ b/c/features/time_series/time-series-edit.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.6 */ diff --git a/c/features/time_series/time-series-range-query.c b/c/features/time_series/time-series-range-query.c index c5da31cc..4ab2ddff 100644 --- a/c/features/time_series/time-series-range-query.c +++ b/c/features/time_series/time-series-range-query.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.6 */ diff --git a/c/features/time_series/time-series-timestamp-append.c b/c/features/time_series/time-series-timestamp-append.c index e3c3387c..ba4fada0 100644 --- a/c/features/time_series/time-series-timestamp-append.c +++ b/c/features/time_series/time-series-timestamp-append.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.3 */ diff --git a/c/features/topic_control/add-topics.c b/c/features/topic_control/add-topics.c index 4eaf322e..36b79640 100644 --- a/c/features/topic_control/add-topics.c +++ b/c/features/topic_control/add-topics.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.0 */ diff --git a/c/features/topic_control/missing-topic-notification.c b/c/features/topic_control/missing-topic-notification.c index 9ce1827d..8d5e2d2d 100644 --- a/c/features/topic_control/missing-topic-notification.c +++ b/c/features/topic_control/missing-topic-notification.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.7 */ diff --git a/c/features/topic_update/topic-update-add-and-set.c b/c/features/topic_update/topic-update-add-and-set.c index 052ef382..8c972b79 100644 --- a/c/features/topic_update/topic-update-add-and-set.c +++ b/c/features/topic_update/topic-update-add-and-set.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.2 */ diff --git a/c/features/topic_update/topic-update-stream.c b/c/features/topic_update/topic-update-stream.c index cb0d9e1f..423bff88 100644 --- a/c/features/topic_update/topic-update-stream.c +++ b/c/features/topic_update/topic-update-stream.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.2 */ diff --git a/c/features/topic_update/topic-update-with-constraint.c b/c/features/topic_update/topic-update-with-constraint.c index 354e296a..b9a7619c 100644 --- a/c/features/topic_update/topic-update-with-constraint.c +++ b/c/features/topic_update/topic-update-with-constraint.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.2 */ diff --git a/c/features/topic_update/topic-update.c b/c/features/topic_update/topic-update.c index ceef878a..df9198b2 100644 --- a/c/features/topic_update/topic-update.c +++ b/c/features/topic_update/topic-update.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.2 */ diff --git a/c/features/topic_update/update-record.c b/c/features/topic_update/update-record.c index d1e9c367..db17d6f8 100644 --- a/c/features/topic_update/update-record.c +++ b/c/features/topic_update/update-record.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.0 */ diff --git a/c/features/topic_views/topic-views-get.c b/c/features/topic_views/topic-views-get.c index e99ea0de..4e1438d6 100644 --- a/c/features/topic_views/topic-views-get.c +++ b/c/features/topic_views/topic-views-get.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.8 */ diff --git a/c/features/topic_views/topic-views-list.c b/c/features/topic_views/topic-views-list.c index 8977aab4..71b455a9 100644 --- a/c/features/topic_views/topic-views-list.c +++ b/c/features/topic_views/topic-views-list.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.6 */ diff --git a/c/features/topic_views/topic-views-remove.c b/c/features/topic_views/topic-views-remove.c index b656cc90..f570a826 100644 --- a/c/features/topic_views/topic-views-remove.c +++ b/c/features/topic_views/topic-views-remove.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.6 */ diff --git a/c/features/topic_views/topic-views.c b/c/features/topic_views/topic-views.c index 7d79bfa9..127b4b4d 100644 --- a/c/features/topic_views/topic-views.c +++ b/c/features/topic_views/topic-views.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.3 */ diff --git a/c/features/topics/binary-topics.c b/c/features/topics/binary-topics.c index 3a01adef..5067483e 100644 --- a/c/features/topics/binary-topics.c +++ b/c/features/topics/binary-topics.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.1 */ diff --git a/c/features/topics/double-topics.c b/c/features/topics/double-topics.c index 96cf7e65..bdbdb97c 100644 --- a/c/features/topics/double-topics.c +++ b/c/features/topics/double-topics.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.1 */ diff --git a/c/features/topics/fetch-request.c b/c/features/topics/fetch-request.c index 8460c17b..da8c9730 100644 --- a/c/features/topics/fetch-request.c +++ b/c/features/topics/fetch-request.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.4 */ diff --git a/c/features/topics/int64-topics.c b/c/features/topics/int64-topics.c index b10688c4..69a36ecb 100644 --- a/c/features/topics/int64-topics.c +++ b/c/features/topics/int64-topics.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.1 */ diff --git a/c/features/topics/recordv2-topics.c b/c/features/topics/recordv2-topics.c index a2d279ef..e8bdf5dd 100644 --- a/c/features/topics/recordv2-topics.c +++ b/c/features/topics/recordv2-topics.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.1 */ diff --git a/c/features/topics/string-topics.c b/c/features/topics/string-topics.c index 2002cbed..78a14255 100644 --- a/c/features/topics/string-topics.c +++ b/c/features/topics/string-topics.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.1 */ diff --git a/c/features/topics/subscribe-multiple.c b/c/features/topics/subscribe-multiple.c index bc5459a7..728491f8 100644 --- a/c/features/topics/subscribe-multiple.c +++ b/c/features/topics/subscribe-multiple.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.0 */ diff --git a/c/features/topics/subscribe.c b/c/features/topics/subscribe.c index 0331dd20..da843a09 100644 --- a/c/features/topics/subscribe.c +++ b/c/features/topics/subscribe.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.1 */ diff --git a/c/reconnect.c b/c/reconnect.c index 9e3ef880..634ffb43 100644 --- a/c/reconnect.c +++ b/c/reconnect.c @@ -14,7 +14,7 @@ * * This example is written in C99. Please use an appropriate C99 capable compiler * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.0 */ diff --git a/dotnet/client-examples.sln b/dotnet/client-examples.sln index 954009c1..0f694c37 100644 --- a/dotnet/client-examples.sln +++ b/dotnet/client-examples.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30011.22 +# Visual Studio Version 17 +VisualStudioVersion = 17.4.33205.214 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{1F4E79D7-6CBD-4E2C-8001-56C6DD086FB9}" EndProject @@ -30,19 +30,9 @@ Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Website", "source\examples\ EndProject Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Manual", "source\examples\Manual\Manual.shproj", "{AA2EF359-4F0C-44C5-9047-2E7D2EFA048D}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CodeSnippets", "source\examples\CodeSnippets\CodeSnippets.csproj", "{4D25893B-C0D9-435B-9F64-658FE31AE2B4}" +EndProject Global - GlobalSection(SharedMSBuildProjectFiles) = preSolution - source\examples\Consuming\Consuming.projitems*{1efbf419-9bee-4e12-9c91-fb2c7738b524}*SharedItemsImports = 5 - source\examples\Features\Features.projitems*{1efbf419-9bee-4e12-9c91-fb2c7738b524}*SharedItemsImports = 5 - source\examples\Manual\Manual.projitems*{1efbf419-9bee-4e12-9c91-fb2c7738b524}*SharedItemsImports = 5 - source\examples\Publishing\Publishing.projitems*{1efbf419-9bee-4e12-9c91-fb2c7738b524}*SharedItemsImports = 5 - source\examples\Website\Website.projitems*{1efbf419-9bee-4e12-9c91-fb2c7738b524}*SharedItemsImports = 5 - source\examples\Consuming\Consuming.projitems*{6e978dc0-d636-4883-b0d8-4ba93667865c}*SharedItemsImports = 13 - source\examples\Publishing\Publishing.projitems*{960603fe-de40-42fe-a1e7-1284e3af1a15}*SharedItemsImports = 13 - source\examples\Manual\Manual.projitems*{aa2ef359-4f0c-44c5-9047-2e7d2efa048d}*SharedItemsImports = 13 - source\examples\Features\Features.projitems*{cbf43c7f-76a7-4476-8f01-ab2f4c89f90e}*SharedItemsImports = 13 - source\examples\Website\Website.projitems*{e306de7d-c209-4230-8533-94134903b03a}*SharedItemsImports = 13 - EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU @@ -60,6 +50,10 @@ Global {1EFBF419-9BEE-4E12-9C91-FB2C7738B524}.Debug|Any CPU.Build.0 = Debug|Any CPU {1EFBF419-9BEE-4E12-9C91-FB2C7738B524}.Release|Any CPU.ActiveCfg = Release|Any CPU {1EFBF419-9BEE-4E12-9C91-FB2C7738B524}.Release|Any CPU.Build.0 = Release|Any CPU + {4D25893B-C0D9-435B-9F64-658FE31AE2B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4D25893B-C0D9-435B-9F64-658FE31AE2B4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4D25893B-C0D9-435B-9F64-658FE31AE2B4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4D25893B-C0D9-435B-9F64-658FE31AE2B4}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -75,8 +69,21 @@ Global {CBF43C7F-76A7-4476-8F01-AB2F4C89F90E} = {1F4E79D7-6CBD-4E2C-8001-56C6DD086FB9} {E306DE7D-C209-4230-8533-94134903B03A} = {1F4E79D7-6CBD-4E2C-8001-56C6DD086FB9} {AA2EF359-4F0C-44C5-9047-2E7D2EFA048D} = {1F4E79D7-6CBD-4E2C-8001-56C6DD086FB9} + {4D25893B-C0D9-435B-9F64-658FE31AE2B4} = {1F4E79D7-6CBD-4E2C-8001-56C6DD086FB9} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {5978CBA1-E70C-47D3-AE8E-057A43482B63} EndGlobalSection + GlobalSection(SharedMSBuildProjectFiles) = preSolution + source\examples\Consuming\Consuming.projitems*{1efbf419-9bee-4e12-9c91-fb2c7738b524}*SharedItemsImports = 5 + source\examples\Features\Features.projitems*{1efbf419-9bee-4e12-9c91-fb2c7738b524}*SharedItemsImports = 5 + source\examples\Publishing\Publishing.projitems*{1efbf419-9bee-4e12-9c91-fb2c7738b524}*SharedItemsImports = 5 + source\examples\Manual\Manual.projitems*{4d25893b-c0d9-435b-9f64-658fe31ae2b4}*SharedItemsImports = 5 + source\examples\Website\Website.projitems*{4d25893b-c0d9-435b-9f64-658fe31ae2b4}*SharedItemsImports = 5 + source\examples\Consuming\Consuming.projitems*{6e978dc0-d636-4883-b0d8-4ba93667865c}*SharedItemsImports = 13 + source\examples\Publishing\Publishing.projitems*{960603fe-de40-42fe-a1e7-1284e3af1a15}*SharedItemsImports = 13 + source\examples\Manual\Manual.projitems*{aa2ef359-4f0c-44c5-9047-2e7d2efa048d}*SharedItemsImports = 13 + source\examples\Features\Features.projitems*{cbf43c7f-76a7-4476-8f01-ab2f4c89f90e}*SharedItemsImports = 13 + source\examples\Website\Website.projitems*{e306de7d-c209-4230-8533-94134903b03a}*SharedItemsImports = 13 + EndGlobalSection EndGlobal diff --git a/dotnet/source/examples/Runner/Runner.csproj b/dotnet/source/examples/Runner/Runner.csproj index ec2864cc..7cab0114 100644 --- a/dotnet/source/examples/Runner/Runner.csproj +++ b/dotnet/source/examples/Runner/Runner.csproj @@ -28,8 +28,4 @@ - - - - diff --git a/java/pom.xml b/java/pom.xml index 6cd55035..a1a30f25 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -11,7 +11,7 @@ com.pushtechnology.diffusion diffusion-api-java-examples - 6.8.8 + 6.8.9 jar Diffusion public API examples. @@ -54,7 +54,7 @@ com.pushtechnology.diffusion diffusion-client - 6.8.8 + 6.8.9 runtime diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/ClientConsumingJSONTopics.java b/java/src/main/java/com/pushtechnology/diffusion/examples/ClientConsumingJSONTopics.java index 73b70e0c..0c9b9cfd 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/ClientConsumingJSONTopics.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/ClientConsumingJSONTopics.java @@ -43,7 +43,7 @@ *

* All updates will be notified to a listener. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.7 * @see ControlClientUpdatingJSONTopics */ diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/ClientConsumingRecordV2Topics.java b/java/src/main/java/com/pushtechnology/diffusion/examples/ClientConsumingRecordV2Topics.java index def14eb3..db0116d3 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/ClientConsumingRecordV2Topics.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/ClientConsumingRecordV2Topics.java @@ -61,7 +61,7 @@ * This example maintains a local map of the rates and also notifies a listener * of any rates changes. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.0 * @see ControlClientUpdatingRecordV2Topics */ diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/ClientConsumingSimpleTopics.java b/java/src/main/java/com/pushtechnology/diffusion/examples/ClientConsumingSimpleTopics.java index 7475d593..e7824bfb 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/ClientConsumingSimpleTopics.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/ClientConsumingSimpleTopics.java @@ -32,7 +32,7 @@ * but the same technique could be used for {@link TopicType#INT64 INT64} or * {@link TopicType#DOUBLE DOUBLE} topics. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.0 * @see ControlClientUpdatingSimpleTopics */ diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/ClientConsumingTimeSeriesTopics.java b/java/src/main/java/com/pushtechnology/diffusion/examples/ClientConsumingTimeSeriesTopics.java index 1fbfdf9c..e15038df 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/ClientConsumingTimeSeriesTopics.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/ClientConsumingTimeSeriesTopics.java @@ -29,7 +29,7 @@ * This demonstrates a client session subscribing to a * {@link TimeSeries} topic. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.0 * @see ControlClientUpdatingTimeSeriesTopics * @see TimeSeriesQueryExample diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/ClientCreatingRecordV2Schema.java b/java/src/main/java/com/pushtechnology/diffusion/examples/ClientCreatingRecordV2Schema.java index 90ef49b2..1f69c6d8 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/ClientCreatingRecordV2Schema.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/ClientCreatingRecordV2Schema.java @@ -25,7 +25,7 @@ *

* Note that no client session is required in order to create a schema. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.0 */ public final class ClientCreatingRecordV2Schema { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/ClientRequestHandling.java b/java/src/main/java/com/pushtechnology/diffusion/examples/ClientRequestHandling.java index 6a59b55a..18aab6dc 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/ClientRequestHandling.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/ClientRequestHandling.java @@ -39,7 +39,7 @@ * * @see ControlClientRequestHandling * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.0 */ public class ClientRequestHandling { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/ClientSimpleSubscriber.java b/java/src/main/java/com/pushtechnology/diffusion/examples/ClientSimpleSubscriber.java index 8dbdf97c..256abb5f 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/ClientSimpleSubscriber.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/ClientSimpleSubscriber.java @@ -34,7 +34,7 @@ * 'select_topic' and 'read_topic' permissions for that branch of the * topic tree. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.0 */ public final class ClientSimpleSubscriber { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/ClientUsingCredentials.java b/java/src/main/java/com/pushtechnology/diffusion/examples/ClientUsingCredentials.java index 00d30e5d..a29db333 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/ClientUsingCredentials.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/ClientUsingCredentials.java @@ -27,7 +27,7 @@ * This is not a realistic use case on its own, but is shown separately here for * clarity. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.0 */ public class ClientUsingCredentials { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/ClientUsingFetch.java b/java/src/main/java/com/pushtechnology/diffusion/examples/ClientUsingFetch.java index 780b762b..d5759e4c 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/ClientUsingFetch.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/ClientUsingFetch.java @@ -40,7 +40,7 @@ *

* This makes use of the 'Topics' feature only. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.2 */ public final class ClientUsingFetch { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/ClientUsingPings.java b/java/src/main/java/com/pushtechnology/diffusion/examples/ClientUsingPings.java index 591c3c63..de47ce3a 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/ClientUsingPings.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/ClientUsingPings.java @@ -28,7 +28,7 @@ *

* This uses the 'Pings' feature only. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.0 */ public final class ClientUsingPings { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/ClientUsingSessionLocks.java b/java/src/main/java/com/pushtechnology/diffusion/examples/ClientUsingSessionLocks.java index eefc2c39..6464bbe9 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/ClientUsingSessionLocks.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/ClientUsingSessionLocks.java @@ -62,7 +62,7 @@ * {@link PathPermission#ACQUIRE_LOCK ACQUIRE_LOCK} permission to * {@code lockA}. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.1 */ public class ClientUsingSessionLocks { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/ClientWithReconnectionStrategy.java b/java/src/main/java/com/pushtechnology/diffusion/examples/ClientWithReconnectionStrategy.java index 5d74d0d1..9137bf85 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/ClientWithReconnectionStrategy.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/ClientWithReconnectionStrategy.java @@ -28,7 +28,7 @@ * This example class demonstrates the ability to set a custom * {@link ReconnectionStrategy} when creating sessions. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.5 */ public class ClientWithReconnectionStrategy { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlAuthenticationClient.java b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlAuthenticationClient.java index e25246fa..ea8c5054 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlAuthenticationClient.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlAuthenticationClient.java @@ -32,7 +32,7 @@ * This is a control client which registers an authentication handler with a * Diffusion server. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.0 */ public final class ControlAuthenticationClient { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientAddingAndRemovingTopics.java b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientAddingAndRemovingTopics.java index 9a528b22..f7d22174 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientAddingAndRemovingTopics.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientAddingAndRemovingTopics.java @@ -37,7 +37,7 @@ * To add or remove topics, the client session must have the 'modify_topic' * permission for that branch of the topic tree. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.0 */ public class ControlClientAddingAndRemovingTopics { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientAsExclusiveUpdater.java b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientAsExclusiveUpdater.java index c8529782..f0bf950b 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientAsExclusiveUpdater.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientAsExclusiveUpdater.java @@ -46,7 +46,7 @@ * To send updates to a topic, the client session requires the 'update_topic' * permission for that branch of the topic tree. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.0 */ public class ControlClientAsExclusiveUpdater { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientChangingSecurity.java b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientChangingSecurity.java index 92c59fd3..9266b267 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientChangingSecurity.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientChangingSecurity.java @@ -37,7 +37,7 @@ *

* This uses the {@link SecurityControl} feature only. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.3 */ public class ControlClientChangingSecurity { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientChangingSystemAuthentication.java b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientChangingSystemAuthentication.java index 3fe4c5ab..e72b23c7 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientChangingSystemAuthentication.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientChangingSystemAuthentication.java @@ -33,7 +33,7 @@ *

* This uses the {@link SystemAuthenticationControl} feature only. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.2 */ public class ControlClientChangingSystemAuthentication { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientConnectingAsynchronously.java b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientConnectingAsynchronously.java index f00de5ec..5579fc57 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientConnectingAsynchronously.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientConnectingAsynchronously.java @@ -26,7 +26,7 @@ * This is a simple example of a client that uses asynchronous connection to * connect, create a topic and then disconnect. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.3 */ public final class ControlClientConnectingAsynchronously { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientDeletesTopicsWithoutSubscribers.java b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientDeletesTopicsWithoutSubscribers.java index a114a48d..7f8c8cd1 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientDeletesTopicsWithoutSubscribers.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientDeletesTopicsWithoutSubscribers.java @@ -32,7 +32,7 @@ * created that will be automatically removed when the number of subscribers * falls to and remains at zero for 10 seconds. * - * @author Push Technology Limited + * @author DiffusionData Limited */ public final class ControlClientDeletesTopicsWithoutSubscribers { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientHandlingMissingTopicNotification.java b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientHandlingMissingTopicNotification.java index 9e5e74a2..65879e90 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientHandlingMissingTopicNotification.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientHandlingMissingTopicNotification.java @@ -34,7 +34,7 @@ * An example of registering a missing topic notification handler and processing * notifications using a control client. * - * @author Push Technology Limited + * @author DiffusionData Limited */ public final class ControlClientHandlingMissingTopicNotification { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientManagingSessionTrees.java b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientManagingSessionTrees.java index f67dcbd0..21ba8e86 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientManagingSessionTrees.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientManagingSessionTrees.java @@ -31,7 +31,7 @@ * This demonstrates creating, retrieving, and removing a branch mapping table * for the {@code market/prices} topic tree branch. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.7 */ public final class ControlClientManagingSessionTrees { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientPartiallyUpdatingTopic.java b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientPartiallyUpdatingTopic.java index 45bd5814..ceb4a4ca 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientPartiallyUpdatingTopic.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientPartiallyUpdatingTopic.java @@ -38,7 +38,7 @@ * To perform a partial update the topic must have a JSON value and the client * must have the 'update_topic' permission for the path. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.4 * @see JavaScript Object Notation (JSON) Patch */ diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientRequestHandling.java b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientRequestHandling.java index d6db6912..52919a4a 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientRequestHandling.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientRequestHandling.java @@ -39,7 +39,7 @@ * * @see ClientRequestHandling * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.0 */ public class ControlClientRequestHandling { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientSubscriptionControl.java b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientSubscriptionControl.java index 1c58f073..5258f5c0 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientSubscriptionControl.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientSubscriptionControl.java @@ -27,7 +27,7 @@ *

* This uses the 'SubscriptionControl' feature. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.0 */ public class ControlClientSubscriptionControl { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientSubscriptionControlRouting.java b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientSubscriptionControlRouting.java index 8c49763a..efbb84c2 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientSubscriptionControlRouting.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientSubscriptionControlRouting.java @@ -32,7 +32,7 @@ *

* This uses the 'SubscriptionControl' feature. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.0 */ public class ControlClientSubscriptionControlRouting { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientTopicNotifications.java b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientTopicNotifications.java index d07f33aa..2dd125e9 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientTopicNotifications.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientTopicNotifications.java @@ -34,7 +34,7 @@ * Examples for using the {@link TopicNotifications} feature to receive * notifications for the topic tree. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.0 */ public class ControlClientTopicNotifications { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientUpdatingJSONTopics.java b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientUpdatingJSONTopics.java index a52aea84..793fa64d 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientUpdatingJSONTopics.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientUpdatingJSONTopics.java @@ -54,7 +54,7 @@ * and so subsequent set calls can compare with the last value * and send only the differences to the server. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.7 * @see ClientConsumingJSONTopics */ diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientUpdatingJSONTopicsWithCBOR.java b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientUpdatingJSONTopicsWithCBOR.java index c89498a7..bcbda721 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientUpdatingJSONTopicsWithCBOR.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientUpdatingJSONTopicsWithCBOR.java @@ -59,7 +59,7 @@ * and so subsequent set calls can compare with the last value * and send only the differences to the server. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.8 * @see ClientConsumingJSONTopics */ diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientUpdatingRecordV2Topics.java b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientUpdatingRecordV2Topics.java index 6a86d949..d112d050 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientUpdatingRecordV2Topics.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientUpdatingRecordV2Topics.java @@ -49,7 +49,7 @@ * to demonstrate the different mechanisms and is not necessarily demonstrating * the most efficient way to update such a topic. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.0 * @see ClientConsumingRecordV2Topics */ diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientUpdatingSimpleTopics.java b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientUpdatingSimpleTopics.java index e93a64e7..898acb74 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientUpdatingSimpleTopics.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientUpdatingSimpleTopics.java @@ -39,7 +39,7 @@ * To send updates to a topic, the client session requires the 'update_topic' * permission for that branch of the topic tree. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.0 */ public final class ControlClientUpdatingSimpleTopics { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientUpdatingTimeSeriesTopics.java b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientUpdatingTimeSeriesTopics.java index a38d544e..7a2ac552 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientUpdatingTimeSeriesTopics.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientUpdatingTimeSeriesTopics.java @@ -41,7 +41,7 @@ * Alternatively, the methods provided by the {@link TopicUpdate} feature can be * used. See {@link TopicUpdateExample} for example usages of this API. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.0 * @see ClientConsumingTimeSeriesTopics * @see TimeSeriesQueryExample diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientUsingFiltersAndProperties.java b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientUsingFiltersAndProperties.java index 3279383f..be7bcc56 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientUsingFiltersAndProperties.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientUsingFiltersAndProperties.java @@ -30,7 +30,7 @@ * messages to clients using message filters. It also demonstrates the ability * to register a request handler with an interest in session property values. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.5 */ public final class ControlClientUsingFiltersAndProperties { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientUsingSessionProperties.java b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientUsingSessionProperties.java index 45a92fa8..3bfd51c0 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientUsingSessionProperties.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientUsingSessionProperties.java @@ -36,7 +36,7 @@ * It also has a method which makes use of filtered subscription to change the * topic that all matching clients are subscribed to. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.6 */ public final class ControlClientUsingSessionProperties { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientUsingTopicLifecycleProperties.java b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientUsingTopicLifecycleProperties.java index b1356b46..6766ed2e 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientUsingTopicLifecycleProperties.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientUsingTopicLifecycleProperties.java @@ -43,7 +43,7 @@ * Also for simplicity all topic creations are blocking and there is no specific * error handling. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.1 */ public final class ControlClientUsingTopicLifecycleProperties { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/CreateRemoteTopicView.java b/java/src/main/java/com/pushtechnology/diffusion/examples/CreateRemoteTopicView.java index 3c837211..2f3ccb5d 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/CreateRemoteTopicView.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/CreateRemoteTopicView.java @@ -33,7 +33,7 @@ * Two sessions are established and a remote topic view is created to map part * of the topic tree from the primary server to the secondary server * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.5 */ public final class CreateRemoteTopicView { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/CreateSecondaryKeys.java b/java/src/main/java/com/pushtechnology/diffusion/examples/CreateSecondaryKeys.java index f0d6f792..158aa5be 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/CreateSecondaryKeys.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/CreateSecondaryKeys.java @@ -33,7 +33,7 @@ * It presents a simplified sportsbook and uses a topic view to create a * secondary key on the country sporting events take place in. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.3 */ public final class CreateSecondaryKeys implements AutoCloseable { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/CreateTopicView.java b/java/src/main/java/com/pushtechnology/diffusion/examples/CreateTopicView.java index 172abb1c..932edd90 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/CreateTopicView.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/CreateTopicView.java @@ -30,7 +30,7 @@ /** * An example of creating a topic view. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.7 */ public final class CreateTopicView { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/TimeSeriesQueryExample.java b/java/src/main/java/com/pushtechnology/diffusion/examples/TimeSeriesQueryExample.java index f602d210..15702cf8 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/TimeSeriesQueryExample.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/TimeSeriesQueryExample.java @@ -54,7 +54,7 @@ * subscribed, the ChatView will be asynchronously updated with new messages and * edits to existing messages. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.0 */ public final class TimeSeriesQueryExample { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/TopicUpdateExample.java b/java/src/main/java/com/pushtechnology/diffusion/examples/TopicUpdateExample.java index f1ce508f..b905b5d2 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/TopicUpdateExample.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/TopicUpdateExample.java @@ -36,7 +36,7 @@ /** * Example showing the use of the {@link TopicUpdate} feature. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.2 */ public final class TopicUpdateExample { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/package-info.java b/java/src/main/java/com/pushtechnology/diffusion/examples/package-info.java index cf32d113..1a5750a8 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/package-info.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/package-info.java @@ -16,7 +16,7 @@ /** * This provides a number of examples of using the Diffusion API. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.0 */ package com.pushtechnology.diffusion.examples; \ No newline at end of file diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/AbstractClient.java b/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/AbstractClient.java index bd933d20..76148645 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/AbstractClient.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/AbstractClient.java @@ -30,7 +30,7 @@ * Abstract client. Supporting a simplified state model and starting and * stopping the client. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.7 */ public abstract class AbstractClient { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/CompetitiveIncrement.java b/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/CompetitiveIncrement.java index b55897b3..83140ee9 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/CompetitiveIncrement.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/CompetitiveIncrement.java @@ -55,7 +55,7 @@ * constraint. If another session has changed the topic value, the update will * fail and the client will retry with the latest known value. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.2 */ public final class CompetitiveIncrement extends AbstractClient { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/ConsumingBinary.java b/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/ConsumingBinary.java index f0667e66..f936c84d 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/ConsumingBinary.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/ConsumingBinary.java @@ -26,7 +26,7 @@ /** * A client that consumes Binary topics. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.7 */ public final class ConsumingBinary extends AbstractClient { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/ConsumingJson.java b/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/ConsumingJson.java index 0bf8b337..36b3dec0 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/ConsumingJson.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/ConsumingJson.java @@ -34,7 +34,7 @@ /** * A client that consumes JSON topics. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.7 */ public final class ConsumingJson extends AbstractClient { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/CoordinatingSessionExample.java b/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/CoordinatingSessionExample.java index e3e1bbe9..7ec581b6 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/CoordinatingSessionExample.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/CoordinatingSessionExample.java @@ -50,7 +50,7 @@ * transferred when a session loses connection. The client handles transient * issues caused by cluster repartitioning. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.2 */ public final class CoordinatingSessionExample extends AbstractClient { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/ProducingBinary.java b/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/ProducingBinary.java index 1dc54ff0..8b467c9d 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/ProducingBinary.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/ProducingBinary.java @@ -32,7 +32,7 @@ /** * A client that creates and updates Binary topics. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.7 */ public final class ProducingBinary extends AbstractClient { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/ProducingJson.java b/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/ProducingJson.java index dc2f2061..e1126271 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/ProducingJson.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/ProducingJson.java @@ -37,7 +37,7 @@ /** * A client that creates and updates JSON topics. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.7 */ public final class ProducingJson extends AbstractClient { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/RandomData.java b/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/RandomData.java index 300c6f74..d42b8f18 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/RandomData.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/RandomData.java @@ -32,7 +32,7 @@ /** * Random data for examples. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.7 */ public final class RandomData { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/ReceivingJson.java b/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/ReceivingJson.java index b3b2589f..1726010f 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/ReceivingJson.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/ReceivingJson.java @@ -29,7 +29,7 @@ * A control client that responds to JSON requests send by the * {@link SendingJson} client. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.7 */ public final class ReceivingJson extends AbstractClient { diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/SendingJson.java b/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/SendingJson.java index 559867e2..369d348d 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/SendingJson.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/SendingJson.java @@ -28,7 +28,7 @@ /** * A client that creates and sends JSON requests. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.7 * @see ReceivingJson */ diff --git a/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/package-info.java b/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/package-info.java index 856689d1..932e9b1c 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/package-info.java +++ b/java/src/main/java/com/pushtechnology/diffusion/examples/runnable/package-info.java @@ -17,7 +17,7 @@ * This provides a number of runnable examples of using the Diffusion API. The examples provide main methods * as entry points. The Diffusion Client Library must be present on the classpath for them to run. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.7 */ package com.pushtechnology.diffusion.examples.runnable; \ No newline at end of file diff --git a/java/src/main/java/com/pushtechnology/diffusion/gettingstarted/PublishingClient.java b/java/src/main/java/com/pushtechnology/diffusion/gettingstarted/PublishingClient.java index 55254b49..0a8d7f57 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/gettingstarted/PublishingClient.java +++ b/java/src/main/java/com/pushtechnology/diffusion/gettingstarted/PublishingClient.java @@ -28,7 +28,7 @@ /** * A client that publishes an incrementing count to the topic 'foo/counter'. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.5 */ public final class PublishingClient { diff --git a/java/src/main/java/com/pushtechnology/diffusion/gettingstarted/SubscribingClient.java b/java/src/main/java/com/pushtechnology/diffusion/gettingstarted/SubscribingClient.java index 33cfbabf..204363b0 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/gettingstarted/SubscribingClient.java +++ b/java/src/main/java/com/pushtechnology/diffusion/gettingstarted/SubscribingClient.java @@ -26,7 +26,7 @@ /** * A client that subscribes to the topic 'foo/counter. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.5 */ public class SubscribingClient { diff --git a/java/src/main/java/com/pushtechnology/diffusion/gettingstarted/package-info.java b/java/src/main/java/com/pushtechnology/diffusion/gettingstarted/package-info.java index ffcb133e..691c6848 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/gettingstarted/package-info.java +++ b/java/src/main/java/com/pushtechnology/diffusion/gettingstarted/package-info.java @@ -16,7 +16,7 @@ /** * This provides simple getting started examples using the Diffusion API. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 5.5 */ package com.pushtechnology.diffusion.gettingstarted; \ No newline at end of file diff --git a/java/src/main/java/com/pushtechnology/diffusion/tutorials/PubSubExample.java b/java/src/main/java/com/pushtechnology/diffusion/tutorials/PubSubExample.java index d1f0becd..5dff2d61 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/tutorials/PubSubExample.java +++ b/java/src/main/java/com/pushtechnology/diffusion/tutorials/PubSubExample.java @@ -31,7 +31,7 @@ /** * Example of basic publish / subscribe functionality. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.0 */ public class PubSubExample { diff --git a/java/src/main/java/com/pushtechnology/diffusion/tutorials/package-info.java b/java/src/main/java/com/pushtechnology/diffusion/tutorials/package-info.java index ff235552..a0f870e1 100644 --- a/java/src/main/java/com/pushtechnology/diffusion/tutorials/package-info.java +++ b/java/src/main/java/com/pushtechnology/diffusion/tutorials/package-info.java @@ -16,7 +16,7 @@ /** * This provides a number of examples of using the Diffusion API. * - * @author Push Technology Limited + * @author DiffusionData Limited * @since 6.0 */ package com.pushtechnology.diffusion.tutorials; \ No newline at end of file diff --git a/js/package.json b/js/package.json index 9655249b..9a12b7bb 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "diffusion-examples", - "version": "6.8.8", + "version": "6.8.9", "description": "Examples for using the Diffusion JavaScript client", "main": "index.js", "directories": { diff --git a/python/examples/connecting/__init__.py b/python/examples/connecting/__init__.py new file mode 100644 index 00000000..9121b24c --- /dev/null +++ b/python/examples/connecting/__init__.py @@ -0,0 +1,9 @@ +# Copyright (c) 2022 Push Technology Ltd., All Rights Reserved. +# +# Use is subject to license terms. +# +# NOTICE: All information contained herein is, and remains the +# property of Push Technology. The intellectual and technical +# concepts contained herein are proprietary to Push Technology and +# may be covered by U.S. and Foreign Patents, patents in process, and +# are protected by trade secret or copyright law. diff --git a/python/examples/connecting/initial_session_establishment_retry_strategy.py b/python/examples/connecting/initial_session_establishment_retry_strategy.py new file mode 100644 index 00000000..e0f72a4a --- /dev/null +++ b/python/examples/connecting/initial_session_establishment_retry_strategy.py @@ -0,0 +1,71 @@ +# Copyright (c) 2022 Push Technology Ltd., All Rights Reserved. +# +# Use is subject to license terms. +# +# NOTICE: All information contained herein is, and remains the +# property of Push Technology. The intellectual and technical +# concepts contained herein are proprietary to Push Technology and +# may be covered by U.S. and Foreign Patents, patents in process, and +# are protected by trade secret or copyright law. + +import asyncio +import traceback + +import diffusion +from diffusion.session.retry_strategy import RetryStrategy + +# Because Python SDK for Diffusion is async, all the code needs to be +# wrapped inside a coroutine function, and executed using asyncio.run. +from diffusion.session import SessionEstablishmentException + + +async def main(): + # tag::initial_retry_strategy[] + # Diffusion server connection information; same for both sessions + # adjust as needed for the server used in practice + server_url = "ws://localhost:8080" + principal = "admin" + credentials = diffusion.Credentials("password") + # Create an initial session establishment retry strategy. + # It will attempt 10 times to connect to the Diffusion server, + # with 5 seconds interval between attempts. + initial_retry_strategy = RetryStrategy(attempts=10, interval=5) + + # starting a session provided by using the results of + # SessionFactory.open() as an async context manager + try: + async with ( + diffusion.sessions() + .principal(principal) + .credentials(credentials) + .initial_retry_strategy(initial_retry_strategy) + .open(server_url) + ) as session: + print(f"Connected. Session Identifier: {session.session_id} (via context manager)") + + except SessionEstablishmentException: + print(f"Failed to open session: {traceback.format_exc()}") + raise + + # starting a session provided by using the results of + # awaiting SessionFactory.open() as a Session + try: + session = ( + await diffusion.sessions() + .principal(principal) + .credentials(credentials) + .initial_retry_strategy(initial_retry_strategy) + .open(server_url) + ) + print(f"Connected. Session Identifier: {session.session_id} (via await)") + except SessionEstablishmentException: + print(f"Failed to open session: {traceback.format_exc()}") + raise + finally: + await session.close() + + # end::initial_retry_strategy[] + + +if __name__ == "__main__": + asyncio.run(main()) diff --git a/python/examples/messaging/add_request_handler.py b/python/examples/messaging/add_request_handler.py index cf73dd0f..060edf9a 100644 --- a/python/examples/messaging/add_request_handler.py +++ b/python/examples/messaging/add_request_handler.py @@ -13,8 +13,8 @@ # handler callback function -def callback(request: str, context=None) -> str: - return f"Hello there, {request}!" +def callback(request: str, context=None) -> diffusion.datatypes.STRING: + return diffusion.datatypes.STRING(f"Hello there, {request}!") path = "path" diff --git a/python/examples/messaging/send_request_to_filter.py b/python/examples/messaging/send_request_to_filter.py index a272a6ac..cf39bb1c 100644 --- a/python/examples/messaging/send_request_to_filter.py +++ b/python/examples/messaging/send_request_to_filter.py @@ -31,8 +31,8 @@ def on_error(code: int, description: str): # Messaging request callback function -def callback(request: str, **kwargs) -> str: - return f"Hello there, {request}!" +def callback(request: str, **kwargs) -> diffusion.datatypes.STRING: + return diffusion.datatypes.STRING(f"Hello there, {request}!") # request properties diff --git a/python/examples/messaging/send_request_to_path.py b/python/examples/messaging/send_request_to_path.py index b9cead58..0c81bff7 100644 --- a/python/examples/messaging/send_request_to_path.py +++ b/python/examples/messaging/send_request_to_path.py @@ -11,8 +11,8 @@ credentials = diffusion.Credentials("password") -def callback(request: str, **kwargs) -> str: - return f"Hello there, {request}!" +def callback(request: str, **kwargs) -> diffusion.datatypes.STRING: + return diffusion.datatypes.STRING(f"Hello there, {request}!") # request properties diff --git a/python/examples/messaging/send_request_to_session.py b/python/examples/messaging/send_request_to_session.py index 6a751219..8777bd07 100644 --- a/python/examples/messaging/send_request_to_session.py +++ b/python/examples/messaging/send_request_to_session.py @@ -12,8 +12,8 @@ credentials = diffusion.Credentials("password") -def callback(request: str, **kwargs) -> str: - return f"Hello there, {request}!" +def callback(request: str, **kwargs) -> diffusion.datatypes.STRING: + return diffusion.datatypes.STRING(f"Hello there, {request}!") # request properties diff --git a/python/examples/metrics/topic_metrics.py b/python/examples/metrics/topic_metrics.py index 77edaa01..0e609a92 100644 --- a/python/examples/metrics/topic_metrics.py +++ b/python/examples/metrics/topic_metrics.py @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Push Technology Ltd., All Rights Reserved. +# Copyright (c) 2021-2023 Push Technology Ltd., All Rights Reserved. # # Use is subject to license terms. # @@ -59,12 +59,13 @@ async def main(): for topic_metric_collector in list_topic_metric_collectors: print( - f"Name: '{topic_metric_collector.name}', " - f"Maximum Groups: {topic_metric_collector.maximum_groups}, " - f"Topic selector: '{topic_metric_collector.topic_selector}', " - f"Group By Path Prefix Parts: {topic_metric_collector.group_by_path_prefix_parts}, " - f"Exports to Prometheus: '{topic_metric_collector.exports_to_prometheus}', " - f"Groups by topic type: '{topic_metric_collector.groups_by_topic_type}'" + f"""\ +Name: '{topic_metric_collector.name}', \ +Maximum Groups: {topic_metric_collector.maximum_groups}, \ +Topic selector: '{topic_metric_collector.topic_selector}', \ +Group By Path Prefix Parts: {topic_metric_collector.group_by_path_prefix_parts}, \ +Exports to Prometheus: '{topic_metric_collector.exports_to_prometheus}', \ +Groups by topic type: '{topic_metric_collector.groups_by_topic_type}''""" ) except Exception as ex: print(f"Failed to list topic metric collectors : {ex}.") diff --git a/python/examples/topics/add_and_set_topic_with_constraint.py b/python/examples/topics/add_and_set_topic_with_constraint.py new file mode 100644 index 00000000..ba4b3b00 --- /dev/null +++ b/python/examples/topics/add_and_set_topic_with_constraint.py @@ -0,0 +1,41 @@ +import asyncio +import diffusion.datatypes +from diffusion.features.topics.update.constraint_factory import ConstraintFactory + +server_url = "ws://localhost:8080" +principal = "admin" +credentials = diffusion.Credentials("password") + +path = "foo/bar" +topic_type = diffusion.datatypes.STRING + + +# Because Python SDK for Diffusion is async, all the code needs to be +# wrapped inside a coroutine function, and executed using asyncio.run. +async def main(): + # creating the session + async with diffusion.Session( + url=server_url, principal=principal, credentials=credentials + ) as session: + await session.topics.remove_topic(path) + update_constraint = ConstraintFactory().no_topic + await session.topics.add_and_set_topic( + path, topic_type, "Value1", update_constraint + ) + print( + f"Topic {path} successfully added as the topic did not originally exist - " + "with it's value set to 'Value1'." + ) + update_constraint2 = ConstraintFactory().value( + diffusion.datatypes.STRING("Value1") + ) + await session.topics.add_and_set_topic( + path, topic_type, "Value2", update_constraint2 + ) + print( + "Topic value set successfully with 'Value2' as topic value was previously 'Value1'." + ) + + +if __name__ == "__main__": + asyncio.run(main()) diff --git a/python/examples/topics/add_topic.py b/python/examples/topics/add_topic.py index 3a7144c1..e1ef00c8 100644 --- a/python/examples/topics/add_topic.py +++ b/python/examples/topics/add_topic.py @@ -1,13 +1,11 @@ import asyncio import diffusion +import diffusion.datatypes as datatypes server_url = "ws://localhost:8080" principal = "admin" credentials = diffusion.Credentials("password") -path = "foo/bar" -topic_type = diffusion.datatypes.STRING - # Because Python SDK for Diffusion is async, all the code needs to be # wrapped inside a coroutine function, and executed using asyncio.run. @@ -17,13 +15,25 @@ async def main(): url=server_url, principal=principal, credentials=credentials ) as session: - # adding a topic - add_response = await session.topics.add_topic(path, topic_type) + # Create a topic from a topic type + path = "topic/string" + add_response = await session.topics.add_topic(path, diffusion.datatypes.STRING) + + print_response(add_response, path, session) + + # Create a topic from a topic specification, with optional properties + path = "topic/integer" + add_response = await session.topics.add_topic( + path, datatypes.INT64.with_properties(VALIDATES_VALUES=True) + ) + print_response(add_response, path, session) + - if add_response == session.topics.CREATED: - print(f"Topic {path} successfully created.") - if add_response == session.topics.EXISTS: - print(f"Topic {path} already exists.") +def print_response(add_response, path, session): + if add_response == session.topics.CREATED: + print(f"Topic {path} successfully created.") + if add_response == session.topics.EXISTS: + print(f"Topic {path} already exists.") if __name__ == "__main__": diff --git a/python/examples/topics/set_topic_with_constraint.py b/python/examples/topics/set_topic_with_constraint.py new file mode 100644 index 00000000..8d6a3d0c --- /dev/null +++ b/python/examples/topics/set_topic_with_constraint.py @@ -0,0 +1,42 @@ +import asyncio + +import diffusion +import diffusion.datatypes +from diffusion.features.topics.update.constraint_factory import ConstraintFactory + +server_url = "ws://localhost:8080" +principal = "admin" +credentials = diffusion.Credentials("password") + +path = "foo/bar" +topic_type = diffusion.datatypes.STRING +value = "bla bla" + + +# Because Python SDK for Diffusion is async, all the code needs to be +# wrapped inside a coroutine function, and executed using asyncio.run. +async def main(): + # creating the session + async with diffusion.Session( + url=server_url, principal=principal, credentials=credentials + ) as session: + await session.topics.remove_topic(path) + await session.topics.add_topic(path, topic_type) + print(f"Topic '{path} successfully added.") + + update_constraint = ConstraintFactory().no_value + await session.topics.set_topic(path, "Value1", topic_type, update_constraint) + print( + "Topic value set successfully with 'Value1' as topic had no value originally." + ) + update_constraint2 = ConstraintFactory().value( + diffusion.datatypes.STRING("Value1") + ) + await session.topics.set_topic(path, "Value2", topic_type, update_constraint2) + print( + "Topic value set successfully with 'Value2' as topic value was previously 'Value1'." + ) + + +if __name__ == "__main__": + asyncio.run(main()) diff --git a/ts/package.json b/ts/package.json index d3dd9375..e6f7a82f 100644 --- a/ts/package.json +++ b/ts/package.json @@ -1,6 +1,6 @@ { "name": "diffusion-examples", - "version": "6.8.8", + "version": "6.8.9", "description": "Examples for using the Diffusion JavaScript client", "main": "index.js", "directories": { @@ -11,7 +11,7 @@ }, "license": "Apache-2.0", "dependencies": { - "diffusion": "6.8.8", + "diffusion": "6.8.9", "@types/node": "14.11.1", "typescript": "4.0.3" } From eafd874e6468c1e137776b049a7e86cc239cbe92 Mon Sep 17 00:00:00 2001 From: GitLab Date: Thu, 11 Apr 2024 08:32:09 +0000 Subject: [PATCH 2/3] Updated Diffusion Examples to 6.8.10 --- c/connect-with-user-context.c | 2 +- java/pom.xml | 4 ++-- js/package.json | 2 +- ts/package.json | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/c/connect-with-user-context.c b/c/connect-with-user-context.c index 49bae63d..0e6508cc 100644 --- a/c/connect-with-user-context.c +++ b/c/connect-with-user-context.c @@ -15,7 +15,7 @@ * This example is written in C99. Please use an appropriate C99 capable compiler * * @author DiffusionData Limited - * @since 6.9 + * @since 6.8 */ /* diff --git a/java/pom.xml b/java/pom.xml index a1a30f25..df3a6f23 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -11,7 +11,7 @@ com.pushtechnology.diffusion diffusion-api-java-examples - 6.8.9 + 6.8.10 jar Diffusion public API examples. @@ -54,7 +54,7 @@ com.pushtechnology.diffusion diffusion-client - 6.8.9 + 6.8.10 runtime diff --git a/js/package.json b/js/package.json index 9a12b7bb..e35daaf1 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "diffusion-examples", - "version": "6.8.9", + "version": "6.8.10", "description": "Examples for using the Diffusion JavaScript client", "main": "index.js", "directories": { diff --git a/ts/package.json b/ts/package.json index e6f7a82f..5fa38996 100644 --- a/ts/package.json +++ b/ts/package.json @@ -1,6 +1,6 @@ { "name": "diffusion-examples", - "version": "6.8.9", + "version": "6.8.10", "description": "Examples for using the Diffusion JavaScript client", "main": "index.js", "directories": { @@ -11,7 +11,7 @@ }, "license": "Apache-2.0", "dependencies": { - "diffusion": "6.8.9", + "diffusion": "6.8.10", "@types/node": "14.11.1", "typescript": "4.0.3" } From cd63652a97017c015574bfde151acc148591c5f3 Mon Sep 17 00:00:00 2001 From: GitLab Date: Tue, 7 May 2024 16:59:18 +0000 Subject: [PATCH 3/3] Updated Diffusion Examples to 6.8.11 --- java/pom.xml | 4 ++-- js/package.json | 2 +- ts/package.json | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/java/pom.xml b/java/pom.xml index df3a6f23..8ca5346a 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -11,7 +11,7 @@ com.pushtechnology.diffusion diffusion-api-java-examples - 6.8.10 + 6.8.11 jar Diffusion public API examples. @@ -54,7 +54,7 @@ com.pushtechnology.diffusion diffusion-client - 6.8.10 + 6.8.11 runtime diff --git a/js/package.json b/js/package.json index e35daaf1..a29350c1 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "diffusion-examples", - "version": "6.8.10", + "version": "6.8.11", "description": "Examples for using the Diffusion JavaScript client", "main": "index.js", "directories": { diff --git a/ts/package.json b/ts/package.json index 5fa38996..311f6412 100644 --- a/ts/package.json +++ b/ts/package.json @@ -1,6 +1,6 @@ { "name": "diffusion-examples", - "version": "6.8.10", + "version": "6.8.11", "description": "Examples for using the Diffusion JavaScript client", "main": "index.js", "directories": { @@ -11,7 +11,7 @@ }, "license": "Apache-2.0", "dependencies": { - "diffusion": "6.8.10", + "diffusion": "6.8.11", "@types/node": "14.11.1", "typescript": "4.0.3" }