Package com.sportradar.unifiedodds.sdk
Class UofSdk
java.lang.Object
com.sportradar.unifiedodds.sdk.UofSdk
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
CustomisableUofSdk,UofSdkExt,UofSdkForReplay
The main SDK object, this is the starting point of the UF SDK.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.google.inject.InjectorThe injector used by this feed instanceprotected final SdkInternalConfigurationThe UofSdk main configuration fileprotected final UofConfiguration -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedUofSdk(UofConfiguration config, com.google.inject.Injector injector) The following constructor should be used only for testing purposesUofSdk(UofGlobalEventsListener listener, UofConfiguration config) The most basic feed constructorprotectedUofSdk(UofGlobalEventsListener listener, UofConfiguration config, boolean useReplay, CustomisableSdkModule customisableSdkModule, UofExtListener uofExtListener) The following constructor is used to crate the UofSdk instance with a custom injection moduleprotectedUofSdk(UofGlobalEventsListener listener, UofConfiguration config, UofExtListener uofExtListener) The following constructor is used to create the UofSdk instance directly with the internal configuration -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Method used to close the feed and all its sessionsprotected com.google.inject.InjectorcreateSdkInjector(UofGlobalEventsListener listener, CustomisableSdkModule customisableSdkModule) Returns theBookingManagerinstance which can be used to perform booking calendar operationsReturns theBookmakerDetailsinstance with bookmaker and token infoReturns theCashOutProbabilitiesManagerinstance used to access probabilities dataReturns theCustomBetManagerinstance which can be used to perform custom bet operationsReturns theEventChangeManagerinstance used to automatically receive fixture and result changesReturns theEventRecoveryRequestIssuerinstance which provides utility methods used to initialize event message recoveriesReturns theMarketDescriptionManagerused to access markets data through our APIReturns theProducerManagerinstance used to manage available producersprotected ReplayManagerReturns the replay manager for the current feed that can be used to add SportEvents and test-scenarios to replay.Builder used to create the required sessionsReturns theSportDataProviderhelper that contains useful methods for specific event data retrievalstatic TokenSetterReturns a builder used to makeUofConfigurationinstancesstatic TokenSettergetUofConfigurationBuilder(String propertiesUri, String yamlUri) protected voidbooleanisOpen()Returns true if feed is openedvoidopen()This method opens/starts the feed with all the built sessions and creates the various tasks needed for optimal UofSdk operation
-
Field Details
-
injector
protected com.google.inject.Injector injectorThe injector used by this feed instance -
oddsFeedConfiguration
The UofSdk main configuration file -
uofConfiguration
-
-
Constructor Details
-
UofSdk
The most basic feed constructor- Parameters:
listener-UofGlobalEventsListenerthat handles global feed eventsconfig-UofConfigurationImpl, the configuration class used to configure the new feed, the configuration can be obtained usinggetUofConfigurationBuilder()
-
UofSdk
protected UofSdk(UofGlobalEventsListener listener, UofConfiguration config, UofExtListener uofExtListener) The following constructor is used to create the UofSdk instance directly with the internal configuration- Parameters:
listener-UofGlobalEventsListenerthat handles global feed eventsconfig-SdkInternalConfiguration, the configuration class used to configure the new feeduofExtListener-UofExtListenerused to receive raw feed and api data
-
UofSdk
protected UofSdk(UofGlobalEventsListener listener, UofConfiguration config, boolean useReplay, CustomisableSdkModule customisableSdkModule, UofExtListener uofExtListener) The following constructor is used to crate the UofSdk instance with a custom injection module- Parameters:
listener-UofGlobalEventsListenerthat handles global feed eventsconfig-UofConfigurationImpl, the configuration class used to configure the new feedcustomisableSdkModule- the customised injection moduleuofExtListener-UofExtListenerused to receive raw feed and api data
-
UofSdk
The following constructor should be used only for testing purposes- Parameters:
injector- a predefined injectorconfig-SdkInternalConfiguration, the configuration class used to configure the new feed
-
-
Method Details
-
getUofConfigurationBuilder
Returns a builder used to makeUofConfigurationinstances- Returns:
- a builder used to make
UofConfigurationinstances - Since:
- 2.0.5
-
getUofConfigurationBuilder
-
getSessionBuilder
Builder used to create the required sessions- Returns:
- current feed session builder
-
getMarketDescriptionManager
Returns theMarketDescriptionManagerused to access markets data through our API- Returns:
MarketDescriptionManagerused to access markets data
-
getSportDataProvider
Returns theSportDataProviderhelper that contains useful methods for specific event data retrieval- Returns:
SportDataProviderused to access various sports data
-
getProducerManager
Returns theProducerManagerinstance used to manage available producers- Returns:
- a
ProducerManagerinstance used to manage available producers
-
getCashOutProbabilitiesManager
Returns theCashOutProbabilitiesManagerinstance used to access probabilities data- Returns:
- a
CashOutProbabilitiesManagerinstance which can be used to access probabilities data
-
getEventRecoveryRequestIssuer
Returns theEventRecoveryRequestIssuerinstance which provides utility methods used to initialize event message recoveries- Returns:
- the
EventRecoveryRequestIssuerinstance associated with the current feed instance
-
getBookingManager
Returns theBookingManagerinstance which can be used to perform booking calendar operations- Returns:
- the
BookingManagerassociated with the currentUofSdkinstance
-
getCustomBetManager
Returns theCustomBetManagerinstance which can be used to perform custom bet operations- Returns:
- the
CustomBetManagerassociated with the currentUofSdkinstance
-
getBookmakerDetails
Returns theBookmakerDetailsinstance with bookmaker and token info- Returns:
- the
BookmakerDetailsassociated with the currentUofSdkinstance
-
getEventChangeManager
Returns theEventChangeManagerinstance used to automatically receive fixture and result changes- Returns:
- a
EventChangeManagerinstance used to automatically receive fixture and result changes
-
open
This method opens/starts the feed with all the built sessions and creates the various tasks needed for optimal UofSdk operation- Throws:
InitException- if the feed fails to initialize
-
isOpen
public boolean isOpen()Returns true if feed is opened- Returns:
- true if opened
-
close
Method used to close the feed and all its sessions- Specified by:
closein interfaceAutoCloseable- Throws:
IOException- if the AMQP connection closure fails
-
getAvailableLanguages
-
initOddsFeedInstance
protected void initOddsFeedInstance() -
createSdkInjector
protected com.google.inject.Injector createSdkInjector(UofGlobalEventsListener listener, CustomisableSdkModule customisableSdkModule) -
getReplayManager
Returns the replay manager for the current feed that can be used to add SportEvents and test-scenarios to replay.- Returns:
- - the replay manager for the current feed that can be used to add SportEvents and test-scenarios to replay
-