Subscriptions

public final class Subscriptions

Maintains the list of the active subscriptions created by the Client.

Subscriptions are created when a client application:

The subscriptions should be cancelled after an update is delivered to the client and no further updates are expected.

All remaining subscriptions are cancelled by the Client when it closes.

See also

Functions

Link copied to clipboard
public boolean cancel(Subscription s)
Requests cancellation the passed subscription.
Link copied to clipboard
public void cancelAll()
Requests cancellation of all subscriptions.
Link copied to clipboard
public static Subscription from(Topic topic)
Creates a new subscription with the given Topic and a random ID.
Link copied to clipboard
public static SubscriptionId generateId()
Generates a new subscription identifier.
Link copied to clipboard
public boolean isEmpty()
Verifies if there are any active subscriptions.
Link copied to clipboard
public static SubscriptionId newId(String value)
Wraps a given String as a subscription identifier.
Link copied to clipboard
public static String toShortString(Subscription s)
Obtains a short printable form of subscription.