public class ReplayManager extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ReplayManager.ReplayStatus |
Constructor and Description |
---|
ReplayManager(OddsFeedConfiguration config,
SportsInfo sportsInfo) |
Modifier and Type | Method and Description |
---|---|
void |
addSportEventToReplay(SportEvent event)
Add a SportEvent to the list of SportEvents whose recorded messages will be replayed.
|
void |
addSportEventToReplay(String id)
Add a SportEvent to the list of SportEvents whose recorded messages will be replayed.
|
void |
clear()
Stops playing recorded messages from the playlist and clears the playlist.
|
ReplayManager.ReplayStatus |
getPlayStatus()
Get the current status of the replayer
|
List<SportEvent> |
getReplayList() |
void |
play()
Starts playing the messages for the SportEvents in the play list.
|
void |
play(double speedupFactor,
int maxDelayInMs)
Starts playing the messages for the SportEvents in the play list.
|
void |
stop()
Stops playing recorded messages from the playlist.
|
public ReplayManager(OddsFeedConfiguration config, SportsInfo sportsInfo)
public List<SportEvent> getReplayList()
public void addSportEventToReplay(SportEvent event)
event
- - the SportEvent to addpublic void addSportEventToReplay(String id)
id
- - the id of the SportEvent to addpublic void play()
public void play(double speedupFactor, int maxDelayInMs)
speedupFactor
- how much faster to replay the recorded events (by default this is 10x
faster)maxDelayInMs
- the longest delay between two events, if the delay would have been longer
than this it is shortened to this much. This is to avoid waiting for very long if two
events were very far apart.public void stop()
public void clear()
public ReplayManager.ReplayStatus getPlayStatus()
Copyright © 2016–2017. All rights reserved.