Siena C++ API documentation (v. 0.4.3)

ThinClient Class Reference

#include <ThinClient.h>

Inheritance diagram for ThinClient:

SienaPull SienaBase List of all members.

Public Member Functions

 ThinClient (const string &uri)
 ThinClient (const string &uri, const string &id)
void set_receiver (Receiver *)
Receiverget_receiver ()
virtual void publish (const Notification &e)
virtual void subscribe (const Filter &f)
virtual void unsubscribe (const Filter &f)
virtual void unsubscribe ()
virtual Notificationget_notification ()
virtual NotificationSequence * get_notification_sequence ()
virtual void suspend ()
virtual void resume ()
virtual void shutdown ()

Detailed Description

implementation of a "pull" interface to Siena
Examples:

publisher.cc, and subscriber.cc.


Constructor & Destructor Documentation

ThinClient::ThinClient ( const string &  uri  ) 

construct a ThinClient connected to a given server

the given URI must be a valid uri for an external (active) Siena server.

ThinClient::ThinClient ( const string &  uri,
const string &  id 
)

construct a ThinClient connected to a given server, with the given ID

the given URI must be a valid uri for an external (active) Siena server. The application must make sure that the ID of this client is unique


Member Function Documentation

void ThinClient::set_receiver ( Receiver  ) 

attaches a receiver to this interface

a ThinClient must have a valid receiver in order to receive notifications. Notice that it is necessary to set a receiver only if the ThinClient is used to subscribe for notifications. If you use the ThinClient only to publish, then you don't need to set a receiver.

Notice: the ThinClient does not manage a receiver. In particular, it does not destroy receivers associated with it. It is the responsibility of the application to create and destroy receivers.

Receiver* ThinClient::get_receiver (  ) 

returns the receiver associated with this ThinClient

virtual void ThinClient::publish ( const Notification e  )  [virtual]

publish a notification

Implements SienaBase.

Examples:
publisher.cc.

virtual void ThinClient::subscribe ( const Filter f  )  [virtual]

subscribes for a class of notifications

Implements SienaPull.

virtual void ThinClient::unsubscribe ( const Filter f  )  [virtual]

cancels subscriptions to notifications

Implements SienaPull.

virtual void ThinClient::unsubscribe (  )  [virtual]

cancel all subscriptions

Implements SienaPull.

virtual Notification* ThinClient::get_notification (  )  [virtual]

receives a notification

receives a notification. This method is synchronous, meaning that it suspends waiting for incoming notifications.

Implements SienaPull.

virtual void ThinClient::shutdown (  )  [virtual]

closes the interface to the Siena service

Reimplemented from SienaBase.

Examples:
publisher.cc.


The documentation for this class was generated from the following file:
Copyright © 2001 University of Colorado.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". This documentation is authored and maintained by Antonio Carzaniga