Implementing an IceStorm Publisher
2 min read
2 min read
2 min read
2 min read
2 min read
2 min read
2 min read
2 min read
2 min read
An IceStorm publisher is an Ice client application that sends requests to a Topic hosted by the IceStorm service.
The IceStorm/weather demo program provides a complete publisher application. It’s available in all programming languages.
The implementation of the weather sensor (or collector) can be summarized as follows:
- Create a proxy for the IceStorm TopicManager . This is the primary IceStorm object, used by both publishers and subscribers.
- Obtain a proxy for the
weathertopic from theTopicManager, either by creating the topic if it does not exist, or by retrieving the proxy for the existing topic. - Obtain a proxy for the
weathertopic's "publisher object" by callinggetPublisheron the topic proxy. This proxy is provided for the purpose of publishing messages, and therefore is narrowed to the topic interface (WeatherStation). - Collect and report readings by invoking on the proxy created in the previous step.