public class BatchSearchApiImpl extends java.lang.Object implements BatchSearchApi
Constructor and Description |
---|
BatchSearchApiImpl(OnlineSearchServiceConfiguration config)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
Single<BatchSearchResponse> |
batchSearch(BatchSearchQuery query)
Performs reactive batch search action based on provided query object
and returns the result to Observers subscribed to returned Observable.
|
void |
batchSearch(BatchSearchQuery searchQuery,
BatchSearchResultListener listener)
Performs batch search action based on provided
BatchSearchQuery object and returns the result with
usage of callback implementation. |
void |
cancelSearchIfRunning()
Cancels the current batch request
|
Scheduler |
getResultScheduler() |
Scheduler |
getWorkingScheduler() |
public BatchSearchApiImpl(OnlineSearchServiceConfiguration config)
config
- search service connection configuration.public void batchSearch(BatchSearchQuery searchQuery, BatchSearchResultListener listener)
BatchSearchApi
BatchSearchQuery
object and returns the result with
usage of callback implementation.batchSearch
in interface BatchSearchApi
searchQuery
- The object which contains data necessary to execute search batch action.listener
- The listener which informs the subscriber when search result is available.
It contains ServiceResponse
object.public void cancelSearchIfRunning()
BatchSearchApi
cancelSearchIfRunning
in interface BatchSearchApi
public Single<BatchSearchResponse> batchSearch(BatchSearchQuery query)
BatchSearchApi
batchSearch
in interface BatchSearchApi
query
- Object which contains data necessary to execute batch search action@NonNull public Scheduler getWorkingScheduler()
getWorkingScheduler
in interface com.tomtom.online.sdk.common.rx.RxContext
@NonNull public Scheduler getResultScheduler()
getResultScheduler
in interface com.tomtom.online.sdk.common.rx.RxContext