YAMI4 for .NET 1.3.0
|
Simple subscription publisher. More...
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< SubscriberInfo > | Subscribers [get] |
Gets list of subscriber info objects, one for each subscriber. |
Simple subscription publisher.
The subscription publisher that notifies remote listeners with published value updates.
Remote listeners can subscribe and unsubscribe at any time.
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.
callback | the callback implementation for unknown commands |
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.
value | new value that is to be sent as update to all listeners |
priority | priority 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.
value | new 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.
destinationTarget | target of the remote listener |
destinationObject | name of the remote listener's object |
YAMIIOException | if the connection to the destination cannot be established |
virtual void Inspirel.YAMI.ValuePublisher.Unsubscribe | ( | string | destinationTarget | ) | [virtual] |
Unsubscribe the given listener.
destinationTarget | target of the remote listener |
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.