org.omg.CosTrading
Interface OfferIteratorOperations

All Known Subinterfaces:
OfferIterator
All Known Implementing Classes:
_OfferIteratorStub, OfferIterator, OfferIteratorPOA, OfferIteratorPOATie

public interface OfferIteratorOperations

The OfferIterator interface is used to return a set of service offers from the query operation by enabling the service offers to be extracted by successive operations on the OfferIterator interface.


Method Summary
 void destroy()
          The destroy operation destroys the iterator.
 int max_left()
          The max_left operation returns the number of service offers remaining in the iterator.
 boolean next_n(int n, OfferSeqHolder offers)
          The next_n operation returns a set of service offers in the output parameter offers.
 

Method Detail

max_left

int max_left()
             throws UnknownMaxLeft
The max_left operation returns the number of service offers remaining in the iterator. The exception UnknownMaxLeft is raised if the iterator cannot determine the remaining number of service offers (e.g., if the iterator determines its set of service offers through lazy evaluation).

Throws:
UnknownMaxLeft

next_n

boolean next_n(int n,
               OfferSeqHolder offers)
The next_n operation returns a set of service offers in the output parameter offers. The operation returns n service offers if there are at least n service offers remaining in the iterator. If there are fewer than n service offers in the iterator, then all remaining service offers are returned. The actual number of service offers returned can be determined from the length of the offers sequence. The next_n operation returns TRUE if there are further service offers to be extracted from the iterator. It returns FALSE if there are no further service offers to be extracted.


destroy

void destroy()
The destroy operation destroys the iterator. No further operations can be invoked on an iterator after it has been destroyed.