Class TopicManager
Maintains the sequence of peer's that are interested in a topic.
Inherited Members
Namespace: PeerTalk.PubSub
Assembly: PeerTalk.dll
Syntax
public class TopicManager
Methods
| Improve this Doc View SourceAddInterest(String, Peer)
Indicate that the Peer is interested in the topic.
Declaration
public void AddInterest(string topic, Peer peer)
Parameters
Type | Name | Description |
---|---|---|
String | topic | The topic of interest. |
Peer | peer | A Peer |
Remarks
Duplicates are ignored.
Clear()
Remove all topics.
Declaration
public void Clear()
Clear(Peer)
Indicates that the peer is not interested in anything.
Declaration
public void Clear(Peer peer)
Parameters
Type | Name | Description |
---|---|---|
Peer | peer | The Peer.s |
GetPeers(String)
Get the peers interested in a topic.
Declaration
public IEnumerable<Peer> GetPeers(string topic)
Parameters
Type | Name | Description |
---|---|---|
String | topic | The topic of interest or null for all topics. |
Returns
Type | Description |
---|---|
IEnumerable<Peer> | A sequence of Peer that are interested
in the |
GetTopics(Peer)
Gets the topics that a peer is interested in
Declaration
public IEnumerable<string> GetTopics(Peer peer)
Parameters
Type | Name | Description |
---|---|---|
Peer | peer | The Peer. |
Returns
Type | Description |
---|---|
IEnumerable<String> | A sequence of topics that the |
RemoveInterest(String, Peer)
Indicate that the Peer is not interested in the topic.
Declaration
public void RemoveInterest(string topic, Peer peer)
Parameters
Type | Name | Description |
---|---|---|
String | topic | The topic of interest. |
Peer | peer | A Peer |