The TopicManager is a singleton object that acts as a factory and repository of
Topic objects. Its interface and related types are shown below:
dictionary<string, Topic*> TopicDict;
exception TopicExists {
string name;
};
exception NoSuchTopic {
string name;
};
interface TopicManager {
Topic* create(string name) throws TopicExists;
idempotent Topic* retrieve(string name) throws NoSuchTopic;
idempotent TopicDict retrieveAll();
idempotent Ice::SliceChecksumDict getSliceChecksums();
};
};
The Topic interface represents a topic and provides several administrative operations
for configuring links and managing subscribers.
struct LinkInfo {
Topic* theTopic;
string name;
int cost;
};
sequence<LinkInfo> LinkInfoSeq;
dictionary<string, string> QoS;
exception LinkExists {
string name;
};
exception NoSuchLink {
string name;
};
exception AlreadySubscribed {};
exception BadQoS {
string reason;
};
interface Topic {
idempotent string getName();
idempotent Object* getPublisher();
idempotent Object* getNonReplicatedPublisher();
// operation throws AlreadySubscribed.
Object* subscribeAndGetPublisher(QoS theQoS, Object* subscriber) throws AlreadySubscribed, BadQoS;
idempotent void unsubscribe(Object* subscriber);
idempotent void link(Topic* linkTo, int cost) throws LinkExists;
idempotent void unlink(Topic* linkTo) throws NoSuchLink;
idempotent LinkInfoSeq getLinkInfoSeq();
void destroy();
};
};
6308



被折叠的 条评论
为什么被折叠?



