Photon Server API
Public Member Functions | Properties | List of all members
ExitGames.Messaging.Channels.TopicSubscription< T > Class Template Reference

A topic subscription receives TopicMessages and filters them by a topic string. The payload of the remainging messages are deserialized with a IMessageSerializer<T> and published on a Concurrency.Channels.IPublisher<T> (typically a Concurrency.Channels.Channel<T>). More...

Inheritance diagram for ExitGames.Messaging.Channels.TopicSubscription< T >:

Public Member Functions

 TopicSubscription (TopicMessageReceiver messageMessageReceiver, string topic, Concurrency.Channels.IPublisher< T > targetPublisher, IMessageSerializer< T > serializer)
 Initializes a new instance of the TopicSubscription<T> class. More...
 
void Dispose ()
 Stops receiving TopicMessages. More...
 

Properties

TopicMessageReceiver Source [get]
 Gets the source of the TopicMessages. More...
 
Concurrency.Channels.IPublisher< T > Target [get]
 Gets the target for the received messages. More...
 
string Topic [get]
 Gets the topic to filter messages with. More...
 

Detailed Description

A topic subscription receives TopicMessages and filters them by a topic string. The payload of the remainging messages are deserialized with a IMessageSerializer<T> and published on a Concurrency.Channels.IPublisher<T> (typically a Concurrency.Channels.Channel<T>).

Template Parameters
TThe message type.

Constructor & Destructor Documentation

ExitGames.Messaging.Channels.TopicSubscription< T >.TopicSubscription ( TopicMessageReceiver  messageMessageReceiver,
string  topic,
Concurrency.Channels.IPublisher< T >  targetPublisher,
IMessageSerializer< T >  serializer 
)
inline

Initializes a new instance of the TopicSubscription<T> class.

Parameters
messageMessageReceiverThe topic message receiver.
topicThe topic that TopicMessages are filtered with.
targetPublisherThe target to publish the received messages on.
serializerThe message serializer.

Member Function Documentation

void ExitGames.Messaging.Channels.TopicSubscription< T >.Dispose ( )
inline

Stops receiving TopicMessages.

Property Documentation

Gets the source of the TopicMessages.

Gets the target for the received messages.

Gets the topic to filter messages with.