Class FeedMessageHelper

java.lang.Object
com.sportradar.unifiedodds.sdk.internal.impl.util.FeedMessageHelper

public class FeedMessageHelper extends Object
  • Constructor Details

    • FeedMessageHelper

      public FeedMessageHelper()
  • Method Details

    • provideProducerIdFromMessage

      public static int provideProducerIdFromMessage(UnmarshalledMessage o)
      Provides the id of the message producer
      Parameters:
      o - - the message from which the producerId should be provided
      Returns:
      - the id of the message producer
    • generateFixtureChangeCacheKey

      public static String generateFixtureChangeCacheKey(com.sportradar.uf.datamodel.UfFixtureChange fixtureChange)
      Returns a built cache key for the provided UfFixtureChange
      Parameters:
      fixtureChange - the object for which the key is needed
      Returns:
      a built cache key for the provided UfFixtureChange
    • provideEventIdFromMessage

      public static String provideEventIdFromMessage(UnmarshalledMessage o)
      Provides the id of the associated event if available, otherwise an explanation why the eventId is not available get(ex: for a snapshot complete -> system message)
      Parameters:
      o - - the message from which the eventIdd should be provided
      Returns:
      - the associated eventId or an explanation why the eventId is not available (ex: for a snapshot complete -> system message)
    • provideMessageGenTimestampFromMessage

      public static Long provideMessageGenTimestampFromMessage(UnmarshalledMessage o)
      Provides the message generation timestamp, the generation timestamp is extracted only from the betstop and oddschange message
      Parameters:
      o - the message from which the timestamp should be provided
      Returns:
      the message generation timestamp if available; otherwise null
    • provideGenTimestampFromMessage

      public static long provideGenTimestampFromMessage(UnmarshalledMessage o)
      Provides the message timestamp
      Parameters:
      o - the message from which the timestamp should be provided
      Returns:
      the message timestamp
    • provideRequestIdFromMessage

      public static Long provideRequestIdFromMessage(UnmarshalledMessage o)
      Provides the request id of the message (if present)
      Parameters:
      o - - the message from which the requestId should be provided
      Returns:
      - the id of the recovery request associated with the message