com.waveset.adapter
Class ClearTrustResourceAdapter.AcctIter

java.lang.Object
  extended bycom.waveset.adapter.ClearTrustResourceAdapter.AcctIter
All Implemented Interfaces:
AccountIterator
Enclosing class:
ClearTrustResourceAdapter

protected class ClearTrustResourceAdapter.AcctIter
extends java.lang.Object
implements AccountIterator

AccountIterator implementation that can be built by construction from the output of mast smc


Field Summary
 
Fields inherited from interface com.waveset.adapter.AccountIterator
code_id
 
Constructor Summary
ClearTrustResourceAdapter.AcctIter(ClearTrustResourceAdapter adapter)
          Convenience constructor that builds an account iterator from a string of space delimited user names.
 
Method Summary
 void close()
          Closes the iterator.
 boolean hasNext()
          Returns true if there are more users to go.
 WSUser next()
          Returns the next user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClearTrustResourceAdapter.AcctIter

public ClearTrustResourceAdapter.AcctIter(ClearTrustResourceAdapter adapter)
Convenience constructor that builds an account iterator from a string of space delimited user names.

Method Detail

hasNext

public boolean hasNext()
Returns true if there are more users to go. Tricky because this cannot return an exception, and neither can the constructor so we have to return false if we cant make the connection. At the end of an iteration (when this returns false), close the connection back to the resource. This implies that you can only have one iteration instance per instance of the resource adapter but that is a restriction in several adapters.

Specified by:
hasNext in interface AccountIterator

next

public WSUser next()
            throws WavesetException
Returns the next user. Fetches the next block of users if block fetch is enabled.

Specified by:
next in interface AccountIterator
Returns:
the next account

Throws:
WavesetException

close

public void close()
Closes the iterator.

Specified by:
close in interface AccountIterator