YAMI4 for .NET 1.3.0

Inspirel.YAMI.ValuePublisher Class Reference

Simple subscription publisher. More...

List of all members.

Classes

class  SubscriberInfo
 Helper class for holding destination target and object for any given subscriber. More...
class  SubscriptionState

Public Member Functions

 ValuePublisher ()
 Initializes a new instance of ValuePublisher
 ValuePublisher (IncomingMessageHandler callback)
 Initializes a new instance of ValuePublisher
virtual void Subscribe (string destinationTarget, string destinationObject)
 Subscribe new listener.
virtual void Unsubscribe (string destinationTarget)
 Unsubscribe the given listener.
virtual void Publish (Parameters value)
 Publishe the new value with default priority.
virtual void Publish (Parameters value, int priority)
 Publishe the new value.
virtual void Close ()
 Unregisters from the controlling agent and cleans up resources.

Properties

virtual int NumberOfSubscribers [get]
 Gets the number of current subscribes.
virtual IList< SubscriberInfoSubscribers [get]
 Gets list of subscriber info objects, one for each subscriber.

Detailed Description

Simple subscription publisher.

The subscription publisher that notifies remote listeners with published value updates.

Remote listeners can subscribe and unsubscribe at any time.


Constructor & Destructor Documentation

Inspirel.YAMI.ValuePublisher.ValuePublisher ( )

Initializes a new instance of ValuePublisher

Creates the subscription publisher that is not registered at any agent.

Inspirel.YAMI.ValuePublisher.ValuePublisher ( IncomingMessageHandler  callback)

Initializes a new instance of ValuePublisher

Creates the subscription publisher that is not registered at any agent and that delegates arbitrary remote commands to the given callback.

Note: The "subscribe" and "unsubscribe" messages are also forwarded to the user-provided callback, but these two messages are already "replied-to" by the published value's implementation.

Parameters:
callbackthe callback implementation for unknown commands

Member Function Documentation

virtual void Inspirel.YAMI.ValuePublisher.Close ( ) [virtual]

Unregisters from the controlling agent and cleans up resources.

virtual void Inspirel.YAMI.ValuePublisher.Publish ( Parameters  value,
int  priority 
) [virtual]

Publishe the new value.

Sends the update message to all active listeners with the given value.

In case of any errors or communication problems, the problematic listener is automatically unsubscribed.

Parameters:
valuenew value that is to be sent as update to all listeners
prioritypriority of the update message
virtual void Inspirel.YAMI.ValuePublisher.Publish ( Parameters  value) [virtual]

Publishe the new value with default priority.

In case of any errors or communication problems, the problematic listener is automatically unsubscribed.

Parameters:
valuenew value that is to be sent as update to all listeners
virtual void Inspirel.YAMI.ValuePublisher.Subscribe ( string  destinationTarget,
string  destinationObject 
) [virtual]

Subscribe new listener.

This function is usually called internally as a result of processing the remote "subscribe" message, but can be also used locally if the listener's location is obtained via other means.

Parameters:
destinationTargettarget of the remote listener
destinationObjectname of the remote listener's object
Exceptions:
YAMIIOExceptionif the connection to the destination cannot be established
virtual void Inspirel.YAMI.ValuePublisher.Unsubscribe ( string  destinationTarget) [virtual]

Unsubscribe the given listener.

Parameters:
destinationTargettarget of the remote listener

Property Documentation

virtual int Inspirel.YAMI.ValuePublisher.NumberOfSubscribers [get]

Gets the number of current subscribes.

virtual IList<SubscriberInfo> Inspirel.YAMI.ValuePublisher.Subscribers [get]

Gets list of subscriber info objects, one for each subscriber.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Enumerations Properties Events