Main Page | Class Hierarchy | Class List | File List | Class Members | Related Pages

glite::rgma::Consumer Class Reference

#include <Consumer.h>

Inheritance diagram for glite::rgma::Consumer:

glite::rgma::ResourceImpl glite::rgma::Resource glite::rgma::ConsumerImpl List of all members.

Public Member Functions

virtual bool isExecuting ()=0 throw (UnknownResourceException, RemoteException, RGMAException)
virtual void abort ()=0 throw (UnknownResourceException, RemoteException)
virtual int count ()=0 throw (UnknownResourceException, RemoteException)
virtual bool hasAborted ()=0 throw (UnknownResourceException, RemoteException)
virtual void pop (ResultSet &results, int maxCount)=0 throw (UnknownResourceException, RemoteException, RGMAException)
virtual void popAll (ResultSet &results)=0 throw (UnknownResourceException, RemoteException, RGMAException)
virtual void start (TimeInterval timeout)=0 throw (UnknownResourceException, RemoteException, RGMAException)
virtual void start (TimeInterval timeout, ResourceEndpointList producers)=0 throw (UnknownResourceException, RemoteException, RGMAException)

Static Public Member Functions

std::string getVersion () throw (RemoteException)
std::string getProperty (std::string name, std::string parameter) throw (RemoteException, RGMAException)
void setProperty (std::string name, std::string value, std::string parameter) throw (RemoteException, RGMAException)
std::string getProperty (std::string name) throw (RemoteException, RGMAException)
void setProperty (std::string name, std::string value) throw (RemoteException, RGMAException)

Protected Attributes

bool m_isExecuting
ResourceEndpointList m_relevantProducers
StringList m_voNames

Detailed Description

A client uses a Consumer to retrieve data from one or more producers. A Consumer is created using a ConsumerFactory.

This is an abstract class which should be extended to produce a consumer

See also:
ConsumerFactory::createConsumer


Member Function Documentation

virtual void glite::rgma::Consumer::abort  )  throw (UnknownResourceException, RemoteException) [pure virtual]
 

Aborts the current query.

Exceptions:
UnknownResourceException If the consumer resource is not found.
RemoteException If the service could not be contacted.

Implemented in glite::rgma::ConsumerImpl.

virtual int glite::rgma::Consumer::count  )  throw (UnknownResourceException, RemoteException) [pure virtual]
 

Returns the number of tuples that are available to pop.

Deprecated:
Returns:
The number of tuples that are available to pop.
Exceptions:
UnknownResourceException If the consumer resource is not found.
RemoteException If the service could not be contacted.

Implemented in glite::rgma::ConsumerImpl.

std::string glite::rgma::Consumer::getProperty std::string  name  )  throw (RemoteException, RGMAException) [static]
 

Gets the value of the specified service property.

Parameters:
name Name of property.
Returns:
Current value of property.
Exceptions:
RemoteException If the service could not be contacted.
RGMAException If the name/parameter combination is invalid.

std::string glite::rgma::Consumer::getProperty std::string  name,
std::string  parameter
throw (RemoteException, RGMAException) [static]
 

Gets the value of the specified service property.

Parameters:
name Name of property.
parameter Parameter to property.
Returns:
Current value of property.
Exceptions:
RemoteException If the service could not be contacted.
RGMAException If the name/parameter combination is invalid.

std::string glite::rgma::Consumer::getVersion  )  throw (RemoteException) [static]
 

Gets the version of this implementation.

Returns:
The version number.
Exceptions:
RemoteException If the service could not be contacted.

virtual bool glite::rgma::Consumer::hasAborted  )  throw (UnknownResourceException, RemoteException) [pure virtual]
 

Determines if the last query has aborted.

Returns:
True if the query was aborted and didn't stop of its own accord.
Exceptions:
UnknownResourceException If the consumer resource is not found.
RemoteException If the service could not be contacted.

Implemented in glite::rgma::ConsumerImpl.

virtual bool glite::rgma::Consumer::isExecuting  )  throw (UnknownResourceException, RemoteException, RGMAException) [pure virtual]
 

Determines whether the last query is still executing on the server.

Deprecated:
Use ResultSet::endOfResults
Returns:
True if the query is still executing.
Exceptions:
UnknownResourceException If the consumer resource is not found.
RemoteException If the service could not be contacted.

Implemented in glite::rgma::ConsumerImpl.

virtual void glite::rgma::Consumer::pop ResultSet results,
int  maxCount
throw (UnknownResourceException, RemoteException, RGMAException) [pure virtual]
 

Retrieves at most maxCount tuples from the consumer that it has received from producers.

Parameters:
maxCount The maximum number of tuples to retrieve.
results a resultSet object to be populated with the results of the pop action
Exceptions:
UnknownResourceException If the consumer resource is not found.
RemoteException If the service could not be contacted.
RGMAException If the query hasn't been started.

Implemented in glite::rgma::ConsumerImpl.

virtual void glite::rgma::Consumer::popAll ResultSet results  )  throw (UnknownResourceException, RemoteException, RGMAException) [pure virtual]
 

Retrieves all data from the consumer that it has received from producers.

Parameters:
results a resultSet object to be populated with the results of the popAll action
Deprecated:
use pop(ResultSet& results, int maxCount)
Exceptions:
UnknownResourceException If the consumer resource is not found.
RemoteException If the service could not be contacted.
RGMAException If the query hasn't been started.

Implemented in glite::rgma::ConsumerImpl.

void glite::rgma::Consumer::setProperty std::string  name,
std::string  value
throw (RemoteException, RGMAException) [static]
 

Changes the value of the specified service property.

Parameters:
name Name of property.
value New value of property.
Exceptions:
RemoteException If the service could not be contacted.
RGMAException If the name/parameter combination is invalid.

void glite::rgma::Consumer::setProperty std::string  name,
std::string  value,
std::string  parameter
throw (RemoteException, RGMAException) [static]
 

Changes the value of the specified service property.

Parameters:
name Name of property.
value New value of property.
parameter Parameter to property.
Exceptions:
RemoteException If the service could not be contacted.
RGMAException If the name/parameter combination is invalid.

virtual void glite::rgma::Consumer::start TimeInterval  timeout,
ResourceEndpointList  producers
throw (UnknownResourceException, RemoteException, RGMAException) [pure virtual]
 

Starts this consumer's query, contacting the specified producers, terminating after the specified time interval. There is no infinite interval; just set the timeout to be very large if this is the effect you want (e.g. 1000 days).

Parameters:
timeout Time interval after which the query will automatically be aborted.
producers List of producers to contact.
Exceptions:
UnknownResourceException If the consumer resource is not found.
RemoteException If the service could not be contacted.
RGMAException If the query is currently executing.

Implemented in glite::rgma::ConsumerImpl.

virtual void glite::rgma::Consumer::start TimeInterval  timeout  )  throw (UnknownResourceException, RemoteException, RGMAException) [pure virtual]
 

Starts this consumer's query, using the mediator to locate producers, terminating after the specified time interval. There is no infinite interval; just set the timeout to be very large if this is the effect you want (e.g. 1000 days).

Parameters:
timeout Time interval after which the query will automatically be aborted.
Exceptions:
UnknownResourceException If the consumer resource is not found.
RemoteException If the service could not be contacted.
RGMAException If the query is currently executing.
Deprecated:

Implemented in glite::rgma::ConsumerImpl.


The documentation for this class was generated from the following files:
Generated on Fri Mar 16 14:00:16 2007 for glite-rgma-api-cpp by doxygen 1.3.5