Previous | Table of Contents | Next |
Methods that return information about more than one resource may return an iterator. The resource description iterator allows
a client to access a large query result sequentially, several resources at a time. This is necessary where the ORB limits
message sizes. It also enables implementations to overlap the client and server processing of query results, if necessary.
The client and the data provider should cooperate to manage the lifetime of the iterator and the resources it consumes. The
destroy() and next_n() methods allow the client and data provider respectively to indicate that the iterator may be destroyed.
In addition, the data provider may autonomously destroy the iterator at any time (for resource management or other reasons).
If a client detects that an iterator has been destroyed, it will not interpret this condition in itself as either an indication
that the end of the iteration has been reached, or as a permanent failure of the data provider.
next_n()
This operation returns possibly 0 and at most n resource descriptions in the form of a resource description sequence. In all
cases the state of the iteration is indicated by the Boolean return value.
• True means that there may be more resource descriptions beyond those returned so far.
• False means all the resource descriptions have now been returned. No further calls are expected for this iterator and the data provider may destroy the iterator at any time after the call returns.
reset()
This operation resets the iterator to the first element.
clone()
This operation returns a copy of the iterator.
destroy()
This operation is used to terminate iteration before all the resource descriptions have been returned. After destroy() is
invoked no further calls are expected for this iterator. The data provider may destroy the iterator at any time after the
call returns.