TOut
- valid Unified API endpoint object generated from API xsd schemaspublic class DataProvider<TOut> extends Object
Constructor and Description |
---|
DataProvider(String uriFormat,
SdkInternalConfiguration config,
com.sportradar.unifiedodds.sdk.internal.impl.HttpDataFetcher logHttpDataFetcher,
Deserializer deserializer) |
DataProvider(String uriFormat,
String apiHostAndPort,
boolean useApiSsl,
Locale defaultLocale,
LogHttpDataFetcher logHttpDataFetcher,
Deserializer deserializer) |
Modifier and Type | Method and Description |
---|---|
TOut |
getData()
If successful returns the requested API endpoint object
|
TOut |
getData(Locale locale,
String... args)
If successful returns the requested API endpoint object
|
TOut |
getData(String... args)
If successful returns the requested API endpoint object
|
DataWrapper<TOut> |
getDataWithAdditionalInfo(Locale locale,
String... args)
If successful returns the requested API endpoint object
|
String |
getFinalUrl(Locale locale,
String arg) |
String |
getFinalUrl(Locale locale,
String[] args) |
TOut |
postData(Object content)
If successful returns the requested API endpoint object
|
static <T> T |
streamFetchCatchEndpoint(DataProvider<T> provider,
Locale l,
String... args)
Method used to wrap up the checked exception in an uncatched exception - streams can not handle checked exception and delegate them forward.
|
String |
toString() |
public DataProvider(String uriFormat, SdkInternalConfiguration config, com.sportradar.unifiedodds.sdk.internal.impl.HttpDataFetcher logHttpDataFetcher, Deserializer deserializer)
public DataProvider(String uriFormat, String apiHostAndPort, boolean useApiSsl, Locale defaultLocale, LogHttpDataFetcher logHttpDataFetcher, Deserializer deserializer)
public TOut getData() throws DataProviderException
DataProviderException
public TOut getData(String... args) throws DataProviderException
args
- that are used with the supplied URI formatDataProviderException
public TOut getData(Locale locale, String... args) throws DataProviderException
locale
- the locale that is used with the supplied URI formatargs
- that are used with the supplied URI formatDataProviderException
public DataWrapper<TOut> getDataWithAdditionalInfo(Locale locale, String... args) throws DataProviderException
locale
- the locale that is used with the supplied URI formatargs
- that are used with the supplied URI formatDataWrapper
instanceDataProviderException
public TOut postData(Object content) throws DataProviderException
content
- the content used to make POST requestDataProviderException
public static <T> T streamFetchCatchEndpoint(DataProvider<T> provider, Locale l, String... args)
DataProviderStreamException
which can be catched out of the stream.T
- the type of the provider endpointprovider
- the provider to perform the fetch withl
- the Locale used for the fetchargs
- a list of arguments which should be passed to the providerCopyright © 2016–2025. All rights reserved.