Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members  

propertyservice::PropertyClient Class Reference

#include <PropertyClient.h>

Inheritance diagram for propertyservice::PropertyClient:

propertyservice::PropertyControl List of all members.

Detailed Description

PropertyClient is a front-end for a CORBA PropertyControl interface.


Public Methods

 PropertyClient (CORBA::ORB_ptr orb, corba::PropertyService_ptr service)
 Create a new PropertyClient front-end for the given CORBA service.

 PropertyClient (std::string service) throw (ORBException&)
 Create a new PropertyClient front-end for the given CORBA service.

 PropertyClient (std::string host, std::string name) throw (ORBException&)
 Create a new PropertyClient front-end for the given service at the given host.

 ~PropertyClient ()
 Destructor.

template<class T> void setProperty (std::string propertyName, T &propertyValue) throw (PropertyException&, NetworkException&, util::io::IOException&)
 Set a property in a property service.

template<class T> T getProperty (std::string propertyName) throw (PropertyException&, NetworkException&, util::io::IOException&)
 Get a property value from a property service.

void addPropertyEventListener (std::string propertyName, PropertyEventListener &listener) throw (PropertyException&, NetworkException&)
 Add an event listener to the internal list of a property service.

void removePropertyEventListener (std::string propertyName, PropertyEventListener &listener) throw (PropertyException&, NetworkException&)
 Remove an event listener from the internal list of a property service.


Friends

class PropertyEventWrapper


Constructor & Destructor Documentation

propertyservice::PropertyClient::PropertyClient CORBA::ORB_ptr    orb,
corba::PropertyService_ptr    service
[inline]
 

Create a new PropertyClient front-end for the given CORBA service.

This constructor assumes that the user has already initialized an orb and got a remote object reference to a property service.

Parameters:
service  the IOR of the property service whose methods are to be wrapped up by the new PropertyClient object.
orb  a pointer to the already initialized orb

propertyservice::PropertyClient::PropertyClient std::string    service throw (ORBException&)
 

Create a new PropertyClient front-end for the given CORBA service.

Parameters:
service  the stringified IOR of the property service whose methods are to be wrapped up by the new PropertyClient object.

propertyservice::PropertyClient::PropertyClient std::string    host,
std::string    name
throw (ORBException&)
 

Create a new PropertyClient front-end for the given service at the given host.

Parameters:
host  the host on which a CORBA naming service resides
name  the name of the service at the host


Member Function Documentation

void propertyservice::PropertyClient::addPropertyEventListener std::string    propertyName,
PropertyEventListener   listener
throw (PropertyException&, NetworkException&)
 

Add an event listener to the internal list of a property service.

Each time the given property name changes, all registered listeners are notified.

Parameters:
propertyName  the name of the property whose changes we want to know
listener  the listener object that receives notifications
Exceptions:
PropertyException  & if the property name is invalid
NetworkException  & if there is a network problem

template<class T>
T propertyservice::PropertyClient::getProperty std::string    propertyName throw (PropertyException&, NetworkException&, util::io::IOException&)
 

Get a property value from a property service.

Any type that can be written to and read from a stream can be used as a property value.

Parameters:
propertyName  the name of the requested property
Returns:
the current value of the property
Exceptions:
PropertyException  & if the property name is invalid or the value is unavailable
IOException  & if the value cannot be read from a stream
NetworkException  & if there is a network problem

void propertyservice::PropertyClient::removePropertyEventListener std::string    propertyName,
PropertyEventListener   listener
throw (PropertyException&, NetworkException&)
 

Remove an event listener from the internal list of a property service.

The listener is no longer notified of property value changes.

Parameters:
propertyName  the name of the property whose changes we do not want to know any more
listener  the listener object that was receiving notifications
Exceptions:
PropertyException  & if the property name is invalid
NetworkException  & if there is a network problem

template<class T>
void propertyservice::PropertyClient::setProperty std::string    propertyName,
T &    propertyValue
throw (PropertyException&, NetworkException&, util::io::IOException&)
 

Set a property in a property service.

Any type that can be written to and read from a stream can be used as a property value. The setting of the property value is made transparently over a network.

Parameters:
propertyName  the name of the property to change in a property service
propertyValue  a new value for the indicated property
Exceptions:
PropertyException  & if the property or its name is invalid
IOException  & if the value cannot be written to a stream
NetworkException  & if there is a network problem


The documentation for this class was generated from the following files:
Documentation generated on 11.09.2003 with Doxygen.
The documentation is copyrighted material.
Copyright © Topi Mäenpää 2003. All rights reserved.