Siena C++ API documentation.

class SimpleSiena: public virtual Siena

a simple implementation of the Siena client-side interface

Inheritance:


Public Methods

[more] SimpleSiena(const string &siena_uri, INAddress::port_type p = 0)
creates a SimpleSiena that identifies itself using the given URI and that receives notifications at the given port
[more]void main_loop()
enters the main loop waiting for notifications


Inherited from Siena:

Public Fields

ostatic const char* Version

Public Methods

ovirtual void publish(const Event &e)
ovirtual void subscribe(const Filter &f, Notifiable *n)
ovirtual void subscribe(const Pattern &p, Notifiable *n)
ovirtual void unsubscribe(const Filter &f, Notifiable *n)
ovirtual void unsubscribe(const Pattern &p, Notifiable *n)
ovirtual void advertise(const Filter &f)
ovirtual void unadvertise(const Filter &)
ovirtual void disconnect(Notifiable *)
ovirtual void suspend(Notifiable *n)
ovirtual void resume(Notifiable *)


Documentation

SimpleSiena implements the client API of Siena.

Example:

    SimpleSiena * S;
    S = new SimpleSiena("senp://milano:1969", 1969);
    Event e;
    e["price"]=100;
    e["stock"]="XYZ";
    
    S->publish(e);

    Notifiable * N;
    //...
    Filter f;
    f.add_filter("stock", Siena_eq, "ZYX");
    S->subscribe(f, N);
    S->main_loop();
    
This implementation of Siena receives notifications using the Siena Event Notification Protocol transmitted on a TCP socket.

Notifications can be received and processed by the corresponding interested parties (Notifiables) when the SienaClient is in its main_loop. Notifications are processed one by one.

o SimpleSiena(const string &siena_uri, INAddress::port_type p = 0)
creates a SimpleSiena that identifies itself using the given URI and that receives notifications at the given port
Parameters:
siena_uri - is the URI that will be used to identify this client.
p - is the port number that this client uses to receive notifications.

ovoid main_loop()
enters the main loop waiting for notifications


This class has no child classes.
See Also:
Siena Notifiable

Alphabetic index HTML hierarchy of classes or Java


This document is part of Siena. Please, direct any comment or suggestion to Antonio Carzaniga