UF SDK 1.x -> 2.x migration guide
SportEvent has been broken down to more closely mimic the actual hierarchy of sport events. Now the following interfaces are used to represent sport events:
- SportEvent - used as a base interface
- Tournament extends SportEvent - represents a tournament
- Competition extends SportEvent - representing matches & races
- Match extends Competition - a competition with a home and an away competitor
- Race extends Competition - a competition with more than two competitors
Changes to interfaces representing the messages received by the feed - Message derived interfaces. In general all market message have a list of market derived types. Each market (when applicable - i.e. MarketWithOdds & MarketWithSettlement) also has a list of Outcome derived types representing market outcomes.
Markets are now represented using three interfaces:
- MarketWithOdds extends Market : used in odds changes
- MarketWithSettlement extends Market : used in bet settlements
The following interfaces are used to represent market outcomes:
- OutcomeSettlement extends Outcome : used on MarketWithSettlement
- OutcomeProbabilites extends Outcome
- OutcomeOdds extends OutcomeProbabilities : used on MarketWithOdds
Introduction of OddsFeed class used to provide a wrapper around different session operations. Each OddsFeed instance is associated with one configuration object (and therefore with one token). In case you need access the odds with multiple tokens, multiple OddsFeed instances have to be created. Sessions are created via the OddsFeedSessionBuilder which can be obtained via a method on OddsFeed instance. Once all the required session objects have been created, they are opened via the open method on the associated OddsFeed instance. Similarly, odds are closed via the close method on the associated OddsFeed instance.
Introduction of OddsFeedConfigurationBuilder interface used to build the configuration used to configure each OddsFeed instances. The instance of builder can be obtained via static getConfigurationBuilder() method on the OddsFeed class. Once the configuration is build it can be used to construct an OddsFeed instance.
Product enumeration was removed in order to support dynamic loading of producers now exposed via Sports API. Available producers and their configuration (last message timestamp, disable a producer, ...) is now available via ProducerManager exposed on the OddsFeed instances.
Introduction of SportEventStatus used to provide status of the associated sport event.