Module com.gluonhq.cloudlink.client
Class RemoteFunctionList
- java.lang.Object
-
- com.gluonhq.cloudlink.client.data.RemoteFunction
-
- com.gluonhq.cloudlink.client.data.RemoteFunctionList
-
public class RemoteFunctionList extends RemoteFunction
An implementation ofRemoteFunction
that is intended to call remote functions that return a list of objects in the form of aGluonObservableList
. The objects in the list are parsed from the completed response of the call to the remote function. This is in contrast with theRemoteFunctionChunkedList
where each object is handled individually.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <E> GluonObservableList<E>
call(InputStreamIterableInputConverter<E> converter)
Triggers a call to the remote function and returns a GluonObservableList that contains the retrieved objects.<E> GluonObservableList<E>
call(Class<E> objectClass)
Triggers a call to the remote function and returns a GluonObservableList that contains the retrieved objects.-
Methods inherited from class com.gluonhq.cloudlink.client.data.RemoteFunction
clearCache, getFunctionName, getParams, getRawBody, isCachingEnabled, setRawBody
-
-
-
-
Method Detail
-
call
public <E> GluonObservableList<E> call(Class<E> objectClass)
Triggers a call to the remote function and returns a GluonObservableList that contains the retrieved objects. The converter that is responsible for providing instances ofobjectClass
based on the response of the remote function call will be determined automatically. Usecall(InputStreamIterableInputConverter)
to specify a custom converter that can handle the response.- Type Parameters:
E
- the type of the objects contained in the list- Parameters:
objectClass
- the class of the objects contained in the list- Returns:
- an instance of GluonObservableList that will hold the retrieved objects upon successful completion of the call to the remote function
-
call
public <E> GluonObservableList<E> call(InputStreamIterableInputConverter<E> converter)
Triggers a call to the remote function and returns a GluonObservableList that contains the retrieved objects. The response from the call to the remote function will be converted by the specifiedconverter
.- Type Parameters:
E
- the type of the objects contained in the list- Parameters:
converter
- the converter to use for transforming the response of the remote function into a list of objects- Returns:
- an instance of GluonObservableList that will hold the retrieved objects upon successful completion of the call to the remote function
-
-