Package com.contentful.java.cda
Class ObserveQuery<T extends CDAResource>
- java.lang.Object
-
- com.contentful.java.cda.AbsQuery<T,ObserveQuery<T>>
-
- com.contentful.java.cda.ObserveQuery<T>
-
public class ObserveQuery<T extends CDAResource> extends AbsQuery<T,ObserveQuery<T>>
Represents a query to the Delivery API which may be invoked via anFlowablesubscription.Observable requests are subscribed and observed on the same thread that executed the request. Call
Flowable.subscribeOn(io.reactivex.Scheduler)andFlowable.observeOn(io.reactivex.Scheduler)to control that.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.reactivex.rxjava3.core.Flowable<CDAArray>all()Observe an array of all resources matching the type of this query.io.reactivex.rxjava3.core.Flowable<T>one(java.lang.String id)Observe a resource matching the givenid.-
Methods inherited from class com.contentful.java.cda.AbsQuery
include, limit, linksToAssetId, linksToEntryId, orderBy, orderBy, reverseOrderBy, select, select, skip, where, where, withContentType, withLocale
-
-
-
-
Method Detail
-
one
public io.reactivex.rxjava3.core.Flowable<T> one(java.lang.String id)
Observe a resource matching the givenid.- Parameters:
id- resource id.- Returns:
Flowableinstance.- Throws:
CDAResourceNotFoundException- if resource was not found.
-
all
public io.reactivex.rxjava3.core.Flowable<CDAArray> all()
Observe an array of all resources matching the type of this query.- Returns:
Flowableinstance.
-
-