public class RemoteFunctionChunkedList extends RemoteFunction
RemoteFunction
that is intended to call remote functions that return a list
of objects in the form of a GluonObservableList
. Each object in the list is handled individually from the
response of the call to the remote function. The response comes in as chunks from a connection with chunked transfer
encoding enabled. This is in contrast with the RemoteFunctionList
where all the objects are parsed from the
entire response of the call to the remote function.Modifier and Type | Method and Description |
---|---|
<E> GluonObservableList<E> |
call(java.lang.Class<E> objectClass)
Triggers a call to the remote function and returns a GluonObservableList that contains the retrieved objects.
|
<E> GluonObservableList<E> |
call(InputStreamInputConverter<E> converter)
Triggers a call to the remote function and returns a GluonObservableList that contains the retrieved objects.
|
clearCache, getFunctionName, getParams, getRawBody, isCachingEnabled, setRawBody
public <E> GluonObservableList<E> call(java.lang.Class<E> objectClass)
The actual call to the endpoint of the remote function will be handled asynchronously. The response that is
returned by the remote function should have chunked transfer encoding enabled. Each chunk that is received while
reading from the response will be converted by an automatically determined converter based on the provided
objectClass
and added to the returned GluonObservableList. Use
call(InputStreamInputConverter)
to specify a custom converter that can handle the chunks.
E
- the type of the objects contained in the listobjectClass
- the class of the objects contained in the listpublic <E> GluonObservableList<E> call(InputStreamInputConverter<E> converter)
The actual call to the endpoint of the remote function will be handled asynchronously. The response that is
returned by the remote function should have chunked transfer encoding enabled. Each chunk that is received while
reading from the response will be converted by the specified converter
and added to the returned
GluonObservableList.
E
- the type of the objects contained in the listconverter
- the converter to use for transforming the chunk into a single object that is added to the list