Class RemoteFunctionList


  • public class RemoteFunctionList
    extends RemoteFunction
    An implementation of RemoteFunction that is intended to call remote functions that return a list of objects in the form of a GluonObservableList. The objects in the list are parsed from the completed response of the call to the remote function. This is in contrast with the RemoteFunctionChunkedList where each object is handled individually.
    • 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 of objectClass based on the response of the remote function call will be determined automatically. Use call(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 specified converter.
        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