Class: SubscribingClient

(abstract) SubscribingClient(actorRequestFactorynon-null)

A client which manages entity state and event subscriptions.

Constructor

(abstract) new SubscribingClient(actorRequestFactorynon-null)

Parameters:
Name Type Description
actorRequestFactory ActorRequestFactory a request factory to build requests to Spine server
Source:

Classes

SubscribingClient

Methods

cancelAllSubscriptions()

Cancels all subscriptions, which were created through this instance of subscribing client.
Source:

newTopic() → {TopicFactory}

Returns a new topic factory instance which can be further used for the `Topic` creation.
Source:
Returns:
Type
TopicFactory

subscribe(topicnon-null) → {Promise.<EntitySubscriptionObject.<Message>>}

Subscribes to a given topic which targets an entity type.
Parameters:
Name Type Description
topic spine.client.Topic a topic to subscribe to
Source:
Returns:
a subscription object
Type
Promise.<EntitySubscriptionObject.<Message>>

subscribeTo(typenon-null, clientnon-null) → {SubscriptionRequest}

Creates a new subscription request.
Parameters:
Name Type Description
type Class.<Message> the target entity type
client Client the client that initiated the request
Source:
Returns:
a new subscription request
Type
SubscriptionRequest

subscribeToEvent(typenon-null, clientnon-null) → {EventSubscriptionRequest}

Creates a new event subscription request.
Parameters:
Name Type Description
type Class.<Message> the target event type
client Client the client that initiated the request
Source:
Returns:
a new event subscription request
Type
EventSubscriptionRequest

subscribeToEvents(topicnon-null) → {Promise.<EventSubscriptionObject>}

Subscribes to the given topic which targets an event type.
Parameters:
Name Type Description
topic spine.client.Topic a topic to subscribe to
Source:
Returns:
a subscription object
Type
Promise.<EventSubscriptionObject>