Class ObservableDataProvider<TOut>
java.lang.Object
com.sportradar.unifiedodds.sdk.internal.impl.DataProvider<TOut>
com.sportradar.unifiedodds.sdk.internal.impl.ObservableDataProvider<TOut>
- Direct Known Subclasses:
DefaultAdditionalMarketMappingsProvider
An utility class which extends
DataProvider which adds the support to listen for possible data changes-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionObservableDataProvider(String uriFormat, SdkInternalConfiguration config, LogHttpDataFetcher logHttpDataFetcher, Deserializer deserializer) -
Method Summary
Modifier and TypeMethodDescriptionabstract TOutgetData()If successful returns the requested API endpoint objectIf successful returns the requested API endpoint objectIf successful returns the requested API endpoint objectgetDataWithAdditionalInfo(Locale locale, String... args) If successful returns the requested API endpoint objectabstract booleanabstract voidregisterWatcher(Class watcherClazz, ObservableDataProvider.DataProviderWatcher watcher) Methods inherited from class com.sportradar.unifiedodds.sdk.internal.impl.DataProvider
getDataWithHeaders, getFinalUrl, getFinalUrl, postData, streamFetchCatchEndpoint, toString
-
Constructor Details
-
ObservableDataProvider
public ObservableDataProvider(String uriFormat, SdkInternalConfiguration config, LogHttpDataFetcher logHttpDataFetcher, Deserializer deserializer)
-
-
Method Details
-
getData
Description copied from class:DataProviderIf successful returns the requested API endpoint object- Overrides:
getDatain classDataProvider<TOut>- Throws:
DataProviderException
-
registerWatcher
public abstract void registerWatcher(Class watcherClazz, ObservableDataProvider.DataProviderWatcher watcher) -
logErrors
public abstract boolean logErrors() -
getData
Description copied from class:DataProviderIf successful returns the requested API endpoint object- Overrides:
getDatain classDataProvider<TOut>- Parameters:
args- that are used with the supplied URI format- Returns:
- the requested API endpoint object
- Throws:
DataProviderException
-
getData
Description copied from class:DataProviderIf successful returns the requested API endpoint object- Overrides:
getDatain classDataProvider<TOut>- Parameters:
locale- the locale that is used with the supplied URI formatargs- that are used with the supplied URI format- Returns:
- the requested API endpoint object
- Throws:
DataProviderException
-
getDataWithAdditionalInfo
public DataWrapper<TOut> getDataWithAdditionalInfo(Locale locale, String... args) throws DataProviderException Description copied from class:DataProviderIf successful returns the requested API endpoint object- Overrides:
getDataWithAdditionalInfoin classDataProvider<TOut>- Parameters:
locale- the locale that is used with the supplied URI formatargs- that are used with the supplied URI format- Returns:
- the requested API endpoint object and other related information wrapped in a
DataWrapperinstance - Throws:
DataProviderException
-