RemoteApiService
Provides ability to handle remote API requests that originate within lenses. Lifecycle of a RemoteApiService is scoped to a lifecycle of a single lens. To provide RemoteApiService instances, register a RemoteApiService.Factory via the Builder.remoteApiServiceFactory method.
Since
1.13.0
Types
Companion
Link copied to clipboard
object Companion
Content copied to clipboard
Provides ability to attach utility functions to the RemoteApiService interface on implementation side.
Factory
Link copied to clipboard
interface Factory
Content copied to clipboard
Creates instances of RemoteApiService scoped to a lifecycle of a single lens.
Noop
Link copied to clipboard
Response
Link copied to clipboard
class Response(request: LensesComponent.RemoteApiService.Request, status: LensesComponent.RemoteApiService.Response.Status, metadata: Map<String, String>, body: ByteArray)
Content copied to clipboard
Functions
close
Link copied to clipboard
abstract override fun close()
Content copied to clipboard
Closes all resources allocated for this RemoteApiService.
process
Link copied to clipboard
abstract fun process(request: LensesComponent.RemoteApiService.Request, onResponse: Consumer<LensesComponent.RemoteApiService.Response>): LensesComponent.RemoteApiService.Call
Content copied to clipboard
Attempts to process the request with one or multiple Responses sent back to the provided onResponse.