Interface LiveScoutFeed
- All Superinterfaces:
UserRequestManager
- All Known Implementing Classes:
LiveScoutFeedImpl
Represents an access-point for live-scout feed.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the communication channel with the live-scout server.voiddispose()Closes the current feed, and disposes all resources associated with it.Holds data about underlying connection parametersvoidgetMatchList(int hoursBack, int hoursForward, boolean includeAvailable) Get a list of matchesvoidgetMatchList(int hoursBack, int hoursForward, boolean includeAvailable, Collection<Integer> sportIds, Collection<Long> matchIds) Requests a list of available scout matches for a given time frame.voidgetMatchList(int hoursBack, int hoursForward, boolean includeAvailable, Collection<Integer> sportIds, Collection<Long> matchIds, UUID requestId) Requests a list of available scout matches for a given time frame.voidgetMatchList(int hoursBack, int hoursForward, boolean includeAvailable, UUID requestId) Get a list of matchesbooleanisOpened()Gets the value specifying whether the current feed is openedvoidopen(LiveScoutFeedListener listener) Opens the communication channel with the live-scout servervoidMakes a server time request.voidsubscribeToTest(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.Methods inherited from interface com.sportradar.livedata.sdk.feed.common.interfaces.UserRequestManager
bookMatches, getSubscribedEvents, getTestManager, subscribe, unsubscribe
-
Method Details
-
isOpened
boolean isOpened()Gets the value specifying whether the current feed is opened- Returns:
- the value specifying whether the current feed is opened
-
open
Opens the communication channel with the live-scout server- Parameters:
listener- TheLiveScoutFeedListenerinstance used to observe the currentLiveScoutFeed- Throws:
IllegalArgumentException- iflisteneris a null reference.IllegalStateException- if the feed is already opened or disposed.
-
getConnectionParams
ConnectionParams getConnectionParams()Holds data about underlying connection parameters- Returns:
- feed connection parameters
-
getMatchList
void getMatchList(int hoursBack, int hoursForward, boolean includeAvailable, Collection<Integer> sportIds, Collection<Long> matchIds, UUID requestId) Requests a list of available scout matches for a given time frame. This method can block to prevent going over the server limits. Use this call in non SDK dispatcher thread!By default only matches you have access to will be sent. You can also request all available matches by setting the
includeAvailableIf this is done the reply will also include matches that are open for booking.- Parameters:
hoursBack- Specifies the open of the time framehoursForward- Specifies the end of the time frameincludeAvailable- Specifies whether matches available for booking should be includedsportIds- - filter by sports ids, nullablematchIds- - filter by matches ids, nullablerequestId- - matchlist request id- Throws:
IllegalStateException- if the feed is not opened
-
getMatchList
void getMatchList(int hoursBack, int hoursForward, boolean includeAvailable, Collection<Integer> sportIds, Collection<Long> matchIds) Requests a list of available scout matches for a given time frame. This method can block to prevent going over the server limits. Use this call in non SDK dispatcher thread!By default only matches you have access to will be sent. You can also request all available matches by setting the
includeAvailableIf this is done the reply will also include matches that are open for booking.- Parameters:
hoursBack- Specifies the open of the time framehoursForward- Specifies the end of the time frameincludeAvailable- Specifies whether matches available for booking should be includedsportIds- - filter by sports ids, nullablematchIds- - filter by matches ids, nullable- Throws:
IllegalStateException- if the feed is not opened
-
getMatchList
void getMatchList(int hoursBack, int hoursForward, boolean includeAvailable) Get a list of matches- 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)
-
getMatchList
Get a list of matches- 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)requestId- - matchlist request id
-
requestServerTime
void requestServerTime()Makes a server time request. This method can block to prevent going over the server limits. Use this call in non SDK dispatcher thread!- Throws:
IllegalStateException- if the feed is already opened or disposed.
-
subscribeToTest
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. If
startMessageis 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.- Parameters:
eventId- The id of the event.messageDelay- Specifies how many milliseconds to wait between sending out each messagestartMessage- Specifies which message to open replay on (how far into the match).- Throws:
IllegalArgumentException- ifeventIdis a null reference.IllegalStateException- if the feed is not opened
-
close
void close()Closes the communication channel with the live-scout server.- Throws:
IllegalStateException- if the feed is already closed.
-
dispose
void dispose()Closes the current feed, and disposes all resources associated with it. Once the feed is disposed, it can n longer be used.
-