Module com.gluonhq.cloudlink.client
Class GluonCloudListDataReaderImpl<E>
- java.lang.Object
-
- com.gluonhq.impl.cloudlink.client.data.GluonCloudListDataReaderImpl<E>
-
- All Implemented Interfaces:
ListDataReader<E>
,Iterator<E>
public class GluonCloudListDataReaderImpl<E> extends Object implements ListDataReader<E>, Iterator<E>
-
-
Field Summary
Fields Modifier and Type Field Description protected GluonObservableListImpl<E>
observable
-
Constructor Summary
Constructors Constructor Description GluonCloudListDataReaderImpl(GluonObservableListImpl<E> observable, IncomingSseProcessor sseProcessor, OperationMode operationMode, UserClient userClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
Iterator<E>
iterator()
Returns an iterator that is able to iterate over the read objects from the list.GluonObservableList<E>
newGluonObservableList()
Provide an instance of a GluonObservableList.E
next()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
-
-
-
Field Detail
-
observable
protected final GluonObservableListImpl<E> observable
-
-
Constructor Detail
-
GluonCloudListDataReaderImpl
public GluonCloudListDataReaderImpl(GluonObservableListImpl<E> observable, IncomingSseProcessor sseProcessor, OperationMode operationMode, UserClient userClient)
-
-
Method Detail
-
newGluonObservableList
public GluonObservableList<E> newGluonObservableList()
Description copied from interface:ListDataReader
Provide an instance of a GluonObservableList. This method will be called byDataProvider.retrieveList(ListDataReader)
to get a GluonObservableList that can be populated. Most implementations will just return an instance of GluonObservableList itself. Note that it is perfectly valid to return existing instances of GluonObservableList.- Specified by:
newGluonObservableList
in interfaceListDataReader<E>
- Returns:
- an instance of GluonObservableList
-
iterator
public Iterator<E> iterator() throws IOException
Description copied from interface:ListDataReader
Returns an iterator that is able to iterate over the read objects from the list. This method will be called byDataProvider.retrieveList(ListDataReader)
to initiate the read process. The returned iterator will be used to populate the GluonObservableList that is returned in theListDataReader.newGluonObservableList()
method.- Specified by:
iterator
in interfaceListDataReader<E>
- Returns:
- an iterator that is able to read over the objects from the list
- Throws:
IOException
- when something went wrong during the process of reading the objects
-
-