public class RemoteFunctionBuilder
extends java.lang.Object
RemoteFunction
instances.Modifier and Type | Method and Description |
---|---|
RemoteFunctionBuilder |
cachingEnabled(boolean cachingEnabled)
Defines whether the responses from calls to the remote function should be cached locally in the private storage
of the device's platform.
|
RemoteFunctionChunkedList |
chunkedList()
Make an instance of
RemoteFunctionChunkedList based on the properties set on this builder. |
static RemoteFunctionBuilder |
create(java.lang.String functionName)
Create a new instance of RemoteFunctionBuilder that can be used to build instances of RemoteFunction.
|
RemoteFunctionList |
list()
Make an instance of
RemoteFunctionList based on the properties set on this builder. |
RemoteFunctionObject |
object()
Make an instance of
RemoteFunctionObject based on the properties set on this builder. |
RemoteFunctionBuilder |
param(java.lang.String key,
java.lang.String value)
Adds a function parameter with the specified
key and value . |
RemoteFunctionBuilder |
rawBody(byte[] rawBody)
Defines the bytes that are sent as the raw body when executing the request to the remote function.
|
public static RemoteFunctionBuilder create(java.lang.String functionName)
functionName
must map with the name of a remote function that is configured in Gluon
CloudLink.functionName
- the name of the configured remote function to callpublic RemoteFunctionBuilder cachingEnabled(boolean cachingEnabled)
cachingEnabled
- true
to enable local caching, false
to disable itRemoteFunction.isCachingEnabled()
public RemoteFunctionBuilder param(java.lang.String key, java.lang.String value)
key
and value
. If a parameter with the
specified key
was already provided before, the old value will be overwritten with the specified
value
.key
- the name of the parametervalue
- the value of the parameterRemoteFunction.getParams()
public RemoteFunctionBuilder rawBody(byte[] rawBody)
rawBody
- the raw bytes to sent as the raw body for the remote functionRemoteFunction.getRawBody()
public RemoteFunctionObject object()
RemoteFunctionObject
based on the properties set on this builder.public RemoteFunctionList list()
RemoteFunctionList
based on the properties set on this builder.public RemoteFunctionChunkedList chunkedList()
RemoteFunctionChunkedList
based on the properties set on this builder.