org.glite.rgma
Interface ConsumerFactory


public interface ConsumerFactory

A factory to create Consumers.


Method Summary
 Consumer createConsumer(TimeInterval terminationInterval, java.lang.String selectStatement, QueryProperties queryProperties)
          Creates a consumer with a specific SELECT query and query type.
 Service getConsumerService()
          Gets a reference to the Consumer service, which can be used to get and set properties and get version.
 Consumer reconnectConsumer(ResourceEndpoint resourceEndpoint)
          Reconnects to an existing Consumer resource.
 

Method Detail

createConsumer

public Consumer createConsumer(TimeInterval terminationInterval,
                               java.lang.String selectStatement,
                               QueryProperties queryProperties)
                        throws RemoteException,
                               RGMAException
Creates a consumer with a specific SELECT query and query type.

Parameters:
terminationInterval - The interval after which this Consumer will be removed from the remote service if there has been no contact from the API.
selectStatement - An SQL SELECT statement.
queryProperties - The properties of the query.
Returns:
A new Consumer.
Throws:
RemoteException - If the service could not be contacted.
RGMAException - If the select statement is invalid. If no endpointReference is defined in properties.

reconnectConsumer

public Consumer reconnectConsumer(ResourceEndpoint resourceEndpoint)
                           throws RGMAException,
                                  RemoteException,
                                  UnknownResourceException
Reconnects to an existing Consumer resource.

Parameters:
resourceEndpoint - Endpoint of the consumer.
Returns:
A reference to the Consumer.
Throws:
RGMAException - If an R-GMA error occurs.
RemoteException - If the service could not be contacted.
UnknownResourceException - If the resource does not exist.

getConsumerService

public Service getConsumerService()
                           throws RGMAException
Gets a reference to the Consumer service, which can be used to get and set properties and get version.

Returns:
A Service object for the Consumer.
Throws:
RGMAException - If an invalid endpoint or no endpoint is defined in properties.