Module com.gluonhq.cloudlink.client
Class RemoteFunctionObject
- java.lang.Object
-
- com.gluonhq.cloudlink.client.data.RemoteFunction
-
- com.gluonhq.cloudlink.client.data.RemoteFunctionObject
-
public class RemoteFunctionObject extends RemoteFunction
An implementation ofRemoteFunctionthat is intended to call remote functions that return single objects in the form of aGluonObservableObject.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> GluonObservableObject<T>call(InputStreamInputConverter<T> converter)Triggers a call to the remote function and returns a GluonObservableObject that contains the retrieved object.<T> GluonObservableObject<T>call(Class<T> objectClass)Triggers a call to the remote function and returns a GluonObservableObject that contains the retrieved object.-
Methods inherited from class com.gluonhq.cloudlink.client.data.RemoteFunction
clearCache, getFunctionName, getParams, getRawBody, isCachingEnabled, setRawBody
-
-
-
-
Method Detail
-
call
public <T> GluonObservableObject<T> call(Class<T> objectClass)
Triggers a call to the remote function and returns a GluonObservableObject that contains the retrieved object. The converter that is responsible for providing an instance ofobjectClassbased on the response of the remote function call will be determined automatically. Usecall(InputStreamInputConverter)to specify a custom converter that can handle the response of the remote function.- Type Parameters:
T- the type of the object that is retrieved- Parameters:
objectClass- the class of the object to retrieve- Returns:
- an instance of GluonObservableObject that will hold the retrieved object upon successful completion of the call to the remote function
-
call
public <T> GluonObservableObject<T> call(InputStreamInputConverter<T> converter)
Triggers a call to the remote function and returns a GluonObservableObject that contains the retrieved object. The response from the call to the remote function will be converted by the specifiedconverter.- Type Parameters:
T- the type of the object that is retrieved- Parameters:
converter- the converter to use for transforming the response of the remote function into an object- Returns:
- an instance of GluonObservableObject that will hold the retrieved object upon successful completion of the call to the remote function
-
-