Home Previous Up Next Index

IceStorm::Topic

Overview

interface Topic

Publishers publish information on a particular topic. A topic logically represents a type.

See Also

TopicManager

Operation Index

getName
Get the name of this topic.
getPublisher
Get a proxy to a publisher object for this topic.
getNonReplicatedPublisher
Get a non-replicated proxy to a publisher object for this topic.
subscribe
Subscribe with the given qos to this topic.

Deprecated.

subscribeAndGetPublisher
Subscribe with the given qos to this topic.
unsubscribe
Unsubscribe the given subscriber.
link
Create a link to the given topic.
unlink
Destroy the link from this topic to the given topic linkTo.
getLinkInfoSeq
Retrieve information on the current links.
destroy
Destroy the topic.

Operations

string getName()

Get the name of this topic.

Return Value

The name of the topic.

See Also

TopicManager::create

Object* getPublisher()

Get a proxy to a publisher object for this topic. To publish data to a topic, the publisher calls getPublisher and then casts to the topic type. An unchecked cast must be used on this proxy. If a replicated IceStorm deployment is used this call may return a replicated proxy.

Return Value

A proxy to publish data on this topic.

Object* getNonReplicatedPublisher()

Get a non-replicated proxy to a publisher object for this topic. To publish data to a topic, the publisher calls getPublisher and then casts to the topic type. An unchecked cast must be used on this proxy.

Return Value

A proxy to publish data on this topic.

void subscribe(QoS theQoS, Object* subscriber)

Subscribe with the given qos to this topic. If the given subscriber proxy has already been registered, it will be replaced. Note that this can cause a loss of events to the subscribed object.

This operation is deprecated as of version 3.2.

subscribe is deprecated, use subscribeAndGetPublisher instead

Parameters

qos
The quality of service parameters for this subscription.
subscriber
The subscriber's proxy.

Return Value

The per-subscriber publisher object.

See Also

unsubscribe

Object* subscribeAndGetPublisher(QoS theQoS, Object* subscriber) throws AlreadySubscribed, BadQoS

Subscribe with the given qos to this topic. A per-subscriber publisher object is returned.

Parameters

qos
The quality of service parameters for this subscription.
subscriber
The subscriber's proxy.

Return Value

The per-subscriber publisher object.

Exceptions

AlreadySubscribed
Raised if the subscriber object is already subscribed.
BadQoS
Raised if the requested quality of service is unavailable or invalid.

See Also

unsubscribe

void unsubscribe(Object* subscriber)

Unsubscribe the given subscriber.

Parameters

subscriber
The proxy of an existing subscriber.

See Also

subscribe

void link(Topic* linkTo, int cost) throws LinkExists

Create a link to the given topic. All events originating on this topic will also be sent to linkTo.

Parameters

linkTo
The topic to link to.
cost
The cost to the linked topic.

Exceptions

LinkExists
Raised if a link to the same topic already exists.

void unlink(Topic* linkTo) throws NoSuchLink

Destroy the link from this topic to the given topic linkTo.

Parameters

link
The topic to destroy the link to.

Exceptions

NoSuchLink
Raised if a link to the topic does not exist.

LinkInfoSeq getLinkInfoSeq()

Retrieve information on the current links.

Return Value

A sequence of LinkInfo objects.

void destroy()

Destroy the topic.


Home Previous Up Next Index