|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A client uses a Consumer to retrieve data from one or more producers. A Consumer is created using a ConsumerFactory.
ConsumerFactory.createConsumer(org.glite.rgma.TimeInterval, java.lang.String, org.glite.rgma.QueryProperties)
Method Summary | |
void |
abort()
Aborts the current query. |
int |
count()
Deprecated. |
boolean |
hasAborted()
Determines if the last query has aborted. |
boolean |
isExecuting()
Deprecated. Use ResultSet#endOfResults |
ResultSet |
pop(int maxCount)
Retrieves at most maxCount tuples from the consumer that it
has received from producers. |
ResultSet |
popAll()
Deprecated. |
void |
start(TimeInterval timeout)
Starts this consumer's query, using the mediator to locate producers, terminating after the specified time interval. |
void |
start(TimeInterval timeout,
ResourceEndpointList producers)
Starts this consumer's query, contacting the specified producers, terminating after the specified time interval. |
Methods inherited from interface org.glite.rgma.Resource |
close, destroy, getResourceEndpoint, getTerminationInterval, setTerminationInterval, showSignOfLife |
Method Detail |
public boolean isExecuting() throws UnknownResourceException, RemoteException
true
if the query is still executing.
UnknownResourceException
- If the consumer resource is not found.
RemoteException
- If the service could not be contacted.start(TimeInterval)
,
start(TimeInterval, ResourceEndpointList)
,
abort()
,
hasAborted()
,
ResultSet.endOfResults()
public void abort() throws RGMAException, UnknownResourceException, RemoteException
RGMAException
- If the query has not been started.
UnknownResourceException
- If the consumer resource is not found.
RemoteException
- If the service could not be contacted.hasAborted()
,
start(TimeInterval)
,
start(TimeInterval, ResourceEndpointList)
,
isExecuting()
public int count() throws UnknownResourceException, RemoteException
pop
call may be greater than the number returned by a
previous call to count
, as tuples can be added in the
intervening time. Once isExecuting
returns
false
, the value of count
can no longer
increase, but will just decrease as tuples are popped.
UnknownResourceException
- If the consumer resource is not found.
RemoteException
- If the service could not be contacted.pop(int)
,
popAll()
,
isExecuting()
public boolean hasAborted() throws UnknownResourceException, RemoteException
true
if the query was aborted and didn't stop of its own accord.
UnknownResourceException
- If the consumer resource is not found.
RemoteException
- If the service could not be contacted.abort()
,
start(TimeInterval)
,
start(TimeInterval, ResourceEndpointList)
,
isExecuting()
public ResultSet pop(int maxCount) throws UnknownResourceException, RemoteException, RGMAException
maxCount
tuples from the consumer that it
has received from producers.
maxCount
- The maximum number of tuples to retrieve.
UnknownResourceException
- If the consumer resource is not found.
RemoteException
- If the service could not be contacted.
RGMAException
- If the query hasn't been started.popAll()
,
count()
public ResultSet popAll() throws UnknownResourceException, RemoteException, RGMAException
isExecuting
is false
).
UnknownResourceException
- If the consumer resource is not found.
RemoteException
- If the service could not be contacted.
RGMAException
- If the query hasn't been started.pop(int)
,
count()
public void start(TimeInterval timeout) throws UnknownResourceException, RemoteException, RGMAException
timeout
- Time interval after which the query will automatically be
aborted.
UnknownResourceException
- If the consumer resource is not found.
RemoteException
- If the service could not be contacted.
RGMAException
- If the query is currently executing.abort()
,
start(TimeInterval, ResourceEndpointList)
,
isExecuting()
public void start(TimeInterval timeout, ResourceEndpointList producers) throws UnknownResourceException, RemoteException, RGMAException
timeout
- Time interval after which the query will automatically be
aborted.producers
- List of producers to contact.
UnknownResourceException
- If the consumer resource is not found.
RemoteException
- If the service could not be contacted.
RGMAException
- If the query is currently executing.start(TimeInterval)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |