PollingEndpoint

Endpoint for a resource that can be polled for state changes.

Type Parameters

TEntity

The type of entity the endpoint represents.

Inheritors

Properties

Link copied to clipboard
Link copied to clipboard
abstract val httpClient: OkHttpClient
Link copied to clipboard
abstract val isDeleteAllowed: Boolean?
Link copied to clipboard
abstract val isMergeAllowed: Boolean?
Link copied to clipboard
abstract val isSetAllowed: Boolean?
Link copied to clipboard
Link copied to clipboard

Interval in which requests are sent to the server. The server may update this interval via the Retry-After response header.

Link copied to clipboard
abstract val response: TEntity?
Link copied to clipboard
abstract val serializers: List<Serializer>
Link copied to clipboard
abstract val uri: URI

Functions

Link copied to clipboard
abstract fun delete()
Link copied to clipboard
abstract fun exists(): Boolean
Link copied to clipboard
abstract fun getLinks(rel: String): List<Pair<URI, String?>>
Link copied to clipboard
abstract fun getObservable(): Observable<TEntity>

Returns an Observable stream of entity states. Consecutive items are emitted only when the server-supplied entity differs from the previously emitted one according to Any.equals.

Link copied to clipboard
abstract fun link(rel: String): URI
Link copied to clipboard
abstract fun linkTemplate(rel: String, variables: Map<String, Any>): URI
Link copied to clipboard
abstract fun merge(entity: TEntity): TEntity?
Link copied to clipboard
abstract fun read(): TEntity
Link copied to clipboard
abstract fun set(entity: TEntity): TEntity?
Link copied to clipboard
abstract fun update(updateAction: (TEntity) -> TEntity, maxRetries: Int): TEntity?