public interface StitchServiceClient
StitchAppClient.callFunction(java.lang.String, java.util.List<?>)
.Modifier and Type | Method and Description |
---|---|
Task<Void> |
callFunction(String name,
List<?> args)
Calls the specified Stitch service function.
|
<ResultT> Task<ResultT> |
callFunction(String name,
List<?> args,
Class<ResultT> resultClass)
Calls the specified Stitch service function, and decodes the response into an instance of the
specified type.
|
<ResultT> Task<ResultT> |
callFunction(String name,
List<?> args,
Class<ResultT> resultClass,
CodecRegistry codecRegistry)
Calls the specified Stitch service function, and decodes the response into an instance of the
specified type.
|
<ResultT> Task<ResultT> |
callFunction(String name,
List<?> args,
Decoder<ResultT> resultDecoder)
Calls the specified Stitch service function, and decodes the response into a value using the
provided
Decoder . |
Task<Void> |
callFunction(String name,
List<?> args,
Long requestTimeout)
Calls the specified Stitch service function.
|
<ResultT> Task<ResultT> |
callFunction(String name,
List<?> args,
Long requestTimeout,
Class<ResultT> resultClass)
Calls the specified Stitch service function, and decodes the response into an instance of the
specified type.
|
<ResultT> Task<ResultT> |
callFunction(String name,
List<?> args,
Long requestTimeout,
Class<ResultT> resultClass,
CodecRegistry codecRegistry)
Calls the specified Stitch service function, and decodes the response into an instance of the
specified type.
|
<ResultT> Task<ResultT> |
callFunction(String name,
List<?> args,
Long requestTimeout,
Decoder<ResultT> resultDecoder)
Calls the specified Stitch service function, and decodes the response into a value using the
provided
Decoder . |
CodecRegistry |
getCodecRegistry()
Get the codec registry that will be used to decode responses when a codec registry.
|
StitchServiceClient |
withCodecRegistry(CodecRegistry codecRegistry)
Create a new StitchServiceClient instance with a different codec registry.
|
Task<Void> callFunction(String name, List<?> args)
name
- the name of the Stitch service function to call.args
- the arguments to pass to the function.Task
that completes when the request completes.<ResultT> Task<ResultT> callFunction(String name, List<?> args, Decoder<ResultT> resultDecoder)
Decoder
.ResultT
- the type into which the response will be decoded.name
- the name of the Stitch service function to call.args
- the arguments to pass to the function.resultDecoder
- the Decoder
to use to decode the response into a value.Task
containing the decoded value.<ResultT> Task<ResultT> callFunction(String name, List<?> args, Class<ResultT> resultClass)
ResultT
- the type into which the response will be decoded.name
- the name of the Stitch service function to call.args
- the arguments to pass to the function.resultClass
- the class that the response should be decoded as.Task
containing the decoded value.<ResultT> Task<ResultT> callFunction(String name, List<?> args, Class<ResultT> resultClass, CodecRegistry codecRegistry)
ResultT
- the type into which the response will be decoded.name
- the name of the Stitch service function to call.args
- the arguments to pass to the function.resultClass
- the class that the response should be decoded as.codecRegistry
- the codec registry used for de/serialization of the function call.Task
containing the decoded value.Task<Void> callFunction(String name, List<?> args, Long requestTimeout)
name
- the name of the Stitch service function to call.args
- the arguments to pass to the function.requestTimeout
- the number of milliseconds the client should wait for a response from the
server before failing with an error.Task
that completes when the request completes.<ResultT> Task<ResultT> callFunction(String name, List<?> args, Long requestTimeout, Decoder<ResultT> resultDecoder)
Decoder
. Also accepts a timeout in milliseconds. Use this for functions that
may run longer than the client-wide default timeout (15 seconds by default).ResultT
- the type into which the response will be decoded.name
- the name of the Stitch service function to call.args
- the arguments to pass to the function.requestTimeout
- the number of milliseconds the client should wait for a response from the
server before failing with an error.resultDecoder
- the Decoder
to use to decode the response into a value.Task
containing the decoded value.<ResultT> Task<ResultT> callFunction(String name, List<?> args, Long requestTimeout, Class<ResultT> resultClass)
ResultT
- the type into which the response will be decoded.name
- the name of the Stitch service function to call.args
- the arguments to pass to the function.requestTimeout
- the number of milliseconds the client should wait for a response from the
server before failing with an error.resultClass
- the class that the response should be decoded as.Task
containing the decoded value.<ResultT> Task<ResultT> callFunction(String name, List<?> args, Long requestTimeout, Class<ResultT> resultClass, CodecRegistry codecRegistry)
ResultT
- the type into which the response will be decoded.name
- the name of the Stitch service function to call.args
- the arguments to pass to the function.requestTimeout
- the number of milliseconds the client should wait for a response from the
server before failing with an error.resultClass
- the class that the response should be decoded as.codecRegistry
- the codec registry used for de/serialization of the function call.Task
containing the decoded value.CodecRegistry getCodecRegistry()
CodecRegistry
StitchServiceClient withCodecRegistry(CodecRegistry codecRegistry)
codecRegistry
- the new CodecRegistry
for the service client.