S
- response type for SubscriptionBridge.subscribe(Topic)
requestsK
- response type for SubscriptionBridge.keepUp(Subscription)
requestsC
- response type for SubscriptionBridge.cancel(Subscription)
requestspublic interface SubscriptionBridge<S extends com.google.protobuf.Message,K extends com.google.protobuf.Message,C extends com.google.protobuf.Message>
SubscriptionService
.
Defines an interface for subscribing
to a Topic
,
keeping up
an existing Subscription
and canceling
an existing Subscription
.
Modifier and Type | Method and Description |
---|---|
C |
cancel(io.spine.client.Subscription subscription)
Cancel the existing subscription, which stopping sending new data updates to the client.
|
K |
keepUp(io.spine.client.Subscription subscription)
Keep up the subscription, prohibiting it from closing from the server-side.
|
S |
subscribe(io.spine.client.Topic topic)
Creates a new
Subscription to a provided topic supplying this subscription to the
client as a result. |
S subscribe(io.spine.client.Topic topic)
Subscription
to a provided topic supplying this subscription to the
client as a result.topic
- a topic to subscribe the client toK keepUp(io.spine.client.Subscription subscription)
This operation is performed because subscription can only live some finite amount of time. Server cancels the subscription at some point, because maintaining the subscription requires resources and the client cannot be trusted to cancel every subscription it creates.
subscription
- a subscription that should stay openC cancel(io.spine.client.Subscription subscription)
subscription
- a subscription that should be stopped from receiving updates