RemoteApiService

interface RemoteApiService : Closeable

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

Call
Link copied to clipboard
sealed class Call
Represents all the possible outcomes when RemoteApiService processes a Request.
Companion
Link copied to clipboard
object Companion
Provides ability to attach utility functions to the RemoteApiService interface on implementation side.
Factory
Link copied to clipboard
interface Factory
Creates instances of RemoteApiService scoped to a lifecycle of a single lens.
Noop
Link copied to clipboard
object Noop : LensesComponent.RemoteApiService
Convenience implementation of RemoteApiService which ignores all requests.
Request
Link copied to clipboard
class Request(id: String, apiSpecId: String, endpointId: String, parameters: Map<String, String>, body: ByteArray)
Defines the data model for a request sent by a lens.
Response
Link copied to clipboard
Defines the data model for a response to a request sent by a lens.

Functions

close
Link copied to clipboard
abstract override fun close()
Closes all resources allocated for this RemoteApiService.
process
Link copied to clipboard
Attempts to process the request with one or multiple Responses sent back to the provided onResponse.

Inheritors

LensesComponent.RemoteApiService
Link copied to clipboard