public class AlongRouteSearchApiImpl extends java.lang.Object implements AlongRouteSearchApi
Constructor and Description |
---|
AlongRouteSearchApiImpl(OnlineSearchServiceConfiguration config) |
Modifier and Type | Method and Description |
---|---|
Single<AlongRouteSearchResponse> |
alongRouteSearch(AlongRouteSearchQuery query)
Performs reactive search along route action based on provided query object and returns the result to Observers subscribed to returned Observable.
|
void |
alongRouteSearch(AlongRouteSearchQuery query,
AlongRouteSearchResultListener listener)
Performs along route search action based on provided query object and returns the result with usage of callback implementation.
|
void |
cancelSearchIfRunning()
Cancels the current along route search request.
|
Scheduler |
getResultScheduler() |
Scheduler |
getWorkingScheduler() |
public AlongRouteSearchApiImpl(OnlineSearchServiceConfiguration config)
config
- search service connection configuration.@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
public Single<AlongRouteSearchResponse> alongRouteSearch(AlongRouteSearchQuery query)
AlongRouteSearchApi
alongRouteSearch
in interface AlongRouteSearchApi
query
- Object which contains data necessary to execute search actionpublic void alongRouteSearch(AlongRouteSearchQuery query, AlongRouteSearchResultListener listener)
AlongRouteSearchApi
alongRouteSearch
in interface AlongRouteSearchApi
query
- The object which contains data necessary to execute search action.listener
- The callback which informs the subscriber when search result is available.public void cancelSearchIfRunning()
AlongRouteSearchApi
cancelSearchIfRunning
in interface AlongRouteSearchApi