Interface UofListener


public interface UofListener
These are all the messages you can receive relating to odds. You implement this interface to handle received messages.
  • Method Details

    • onOddsChange

      void onOddsChange(UofSession sender, OddsChange<SportEvent> oddsChanges)
      Any kind of odds update, or betstop signal results in an OddsChanges Message.
      Parameters:
      sender - the session
      oddsChanges - the odds changes message
    • onBetStop

      void onBetStop(UofSession sender, BetStop<SportEvent> betStop)
      Send to rapidly suspend a set of markets (often all)
      Parameters:
      sender - the session
      betStop - the betstop message
    • onBetSettlement

      void onBetSettlement(UofSession sender, BetSettlement<SportEvent> clearBets)
      The onBetSettlement callback is received whenever a BetSettlement message is received. It contains information about what markets that should be settled how. All markets and outcomes that you have received odds changes messages for at some point in time you will receive betsettlement messages for at some later point in time. That is if you receive odds for outcome X for market Y, you will at a later time receive a BetSettlement message that includes outcome X for market Y.
      Parameters:
      sender - the session
      clearBets - the BetSettlement message
    • onRollbackBetSettlement

      void onRollbackBetSettlement(UofSession sender, RollbackBetSettlement<SportEvent> rollbackBetSettlement)
      If a BetSettlement was generated in error, you may receive a RollbackBetsettlement and have to try to do whatever you can to undo the BetSettlement if possible.
      Parameters:
      sender - the session
      rollbackBetSettlement - the rollbackBetSettlement message referring to a previous BetSettlement
    • onBetCancel

      void onBetCancel(UofSession sender, BetCancel<SportEvent> betCancel)
      If the markets were cancelled you may receive a BetCancel describing which markets were cancelled
      Parameters:
      sender - the session
      betCancel - A BetCancel instance specifying which markets were cancelled
    • onRollbackBetCancel

      void onRollbackBetCancel(UofSession sender, RollbackBetCancel<SportEvent> rbBetCancel)
      If the bet cancellations were send in error you may receive a RollbackBetCancel describing the erroneous cancellations
      Parameters:
      sender - the session
      rbBetCancel - A RollbackBetCancel specifying erroneous cancellations
    • onFixtureChange

      void onFixtureChange(UofSession sender, FixtureChange<SportEvent> fixtureChange)
      If there are important fixture updates you will receive fixturechange message. The thinking is that most fixture updates are queried by you yourself using the SportDataProvider. However, if there are important/urgent changes you will also receive a fixture change message (e.g. if a match gets delayed, or if Sportradar for some reason needs to stop live coverage of a match etc.). This message allows you to promptly respond to such changes
      Parameters:
      sender - the session
      fixtureChange - the SDKFixtureChange message - describing what sport event and what type of fixture change
    • onUnparsableMessage

      void onUnparsableMessage(UofSession sender, UnparsableMessage unparsableMessage)
      This handler is called when the SDK detects that it has problems parsing/dispatching a message. The handler can decide to take some custom action (shutting down everything etc. doing some special analysis of the raw message content etc) or just ignore the message. The SDK itself will always log that it has received an unparseable message.
      Parameters:
      sender - the session
      unparsableMessage - A UnparsableMessage instance describing the message that had issues
      Since:
      v2.0.11
    • onUserUnhandledException

      void onUserUnhandledException(UofSession sender, Exception exception)
      This handler is called when the SDK detects problems while UofListener process a message. The handler can choose to handle exception or just ignore it. The SDK itself will always log exception.
      Parameters:
      sender - the session
      exception - A Exception instance containing unhandled exception