IceStorm::Topic

Ice Reference Documentation
<<< Previous | Slice Documentation | Next >>>

# `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.

`subscribe`

  Subscribe with the given QoS to this topic.

`unsubscribe`

  Unsubscribe the given `unsubscribe`.

`link`

  Create a link to the given topic.

`unlink`

  Destroy the link from this topic to the given topic `unlink`.

`getLinkInfoSeq`

  Retrieve information on the current links.

`destroy`

  Destroy the topic.

## `getName`

    string getName();

Get the name of this topic.

### Return Value

The name of the topic.

### See Also

`TopicManager::create`

## `getPublisher`

    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.

### Return Value

A proxy to publish data on this topic.

## `subscribe`

    void subscribe(QoS theQoS,
        Object* subscriber);

Subscribe with the given QoS to this topic. If the given `subscribe` proxy has already been registered, it will be replaced.

### Parameters

`qos`

  The quality of service parameters for this subscription.

`subscriber`

  The subscriber's proxy.

### See Also

`unsubscribe`

## `unsubscribe`

    void unsubscribe(Object* subscriber);

Unsubscribe the given `unsubscribe`.

### Parameters

`subscriber`

  The proxy of an existing subscriber.

### See Also

`subscribe`

## `link`

    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 `link`.

### 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.

## `unlink`

    void unlink(Topic* linkTo)
        throws
    	NoSuchLink;

Destroy the link from this topic to the given topic `unlink`.

### Parameters

`link`

  The topic to destroy the link to.

### Exceptions

`NoSuchLink`

  Raised if a link to the topic does not exist.

## `getLinkInfoSeq`

    LinkInfoSeq getLinkInfoSeq();

Retrieve information on the current links.

### Return Value

A sequence of LinkInfo objects.

## `destroy`

    void destroy();

Destroy the topic.

<<< Previous | Home | Next >>>
`IceStorm::NoSuchTopic` | Up | `IceStorm::TopicExists`