Class LiveScoutFeedImpl

    • Field Detail

      • lock

        protected final Object lock
        Object lock to ensure closing of the feed is called only once
      • sdkLogger

        protected final SdkLogger sdkLogger
        Sdk logging facility.
    • Method Detail

      • isOpened

        public boolean isOpened()
        Gets the value specifying whether the current feed is opened
        Specified by:
        isOpened in interface LiveScoutFeed
        Returns:
        the value specifying whether the current feed is opened
      • getMatchList

        public void getMatchList​(int hoursBack,
                                 int hoursForward,
                                 boolean includeAvailable,
                                 Collection<Long> sportIds,
                                 Collection<Long> matchIds)

        Requests a list of available scout matches for a given time frame.

        By default only matches you have access to will be sent. You can also request all available matches by setting the includeAvailable If this is done the reply will also include matches that are open for booking.
        Specified by:
        getMatchList in interface LiveScoutFeed
        Parameters:
        hoursBack - Specifies the open of the time frame
        hoursForward - Specifies the end of the time frame
        includeAvailable - Specifies whether matches available for booking should be included
        sportIds - - filter by sports ids, nullable
        matchIds - - filter by matches ids, nullable
      • getMatchList

        public void getMatchList​(int hoursBack,
                                 int hoursForward,
                                 boolean includeAvailable)
        Description copied from interface: LiveScoutFeed
        Get a list of matches
        Specified by:
        getMatchList in interface LiveScoutFeed
        Parameters:
        hoursBack - - number of hours back (from current time)
        hoursForward - - number of hours forward (from current time)
        includeAvailable - - include also available matches (which you have not booked yet)
      • requestServerTime

        public void requestServerTime()
        Description copied from interface: LiveScoutFeed
        Makes a server time request. This method can block to prevent going over the server limits. Use this call in non SDK dispatcher thread!
        Specified by:
        requestServerTime in interface LiveScoutFeed
      • bookMatches

        public void bookMatches​(EventIdentifier[] eventIds)
        Book the specified matches. Booked matches cannot be cancelled through this interface.

        You should prefer using the Live Calendar on the Betradar website (http://www.betradar.com) which offers automatic booking for certain types of matches.

        Note that booking matches will have a cost depending on the type of agreement you have with Sportradar.

        LiveScout: Expect LiveScoutFeedListener.onMatchBooked(LiveScoutFeed, MatchBookingEntity) message in reply.

        Specified by:
        bookMatches in interface UserRequestManager
        Parameters:
        eventIds - The id of events to book
      • subscribeToTest

        public void subscribeToTest​(EventIdentifier eventId,
                                    Integer messageDelay,
                                    Integer startMessage)

        Request a full feed for the match, and then update messages will follow in the same pace as they were sent out live.

        This should only be used on the test server.

        Specified by:
        subscribeToTest in interface LiveScoutFeed
        Parameters:
        eventId - The id of the event.
        messageDelay - Specifies how many milliseconds to wait between sending out each message
        startMessage - Specifies which message to open replay on (how far into the match). If startMessage is greater than or equal to the number of messages for the match, a full feed for the finished match is sent out, and no more messages will follow after this.
      • close

        public void close()
        Closes the communication channel with the live-scout server.
        Specified by:
        close in interface LiveScoutFeed
      • dispose

        public final void dispose()
        Closes the current feed, and disposes all resources associated with it. Once the feed is disposed, it can n longer be used.
        Specified by:
        dispose in interface LiveScoutFeed