|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IDynamicPlaylistTrackProvider
Provides tracks on demand for the DynamicPlaylistStrategy
playlist.
The provider must maintain a history of provided tracks so that no tracks are
provided two times (unless this functionality is explicitly required - for
example when a playlist with same tracks is provided).
When there are no more items to play, the provider should clean up after itself and wait to be garbage-collected.
All providers must be serializable.
Method Summary | |
---|---|
void |
removeFromHistory(int trackCount)
Removes given amount of oldest tracks from the history. |
void |
reset()
Reinitializes itself - polls tracks from the DB etc. |
void |
setRandom(Random random,
TrackMetadataBean currentTrack)
Sets the random mode of tracks provided next by the provider. |
Methods inherited from interface java.util.Iterator |
---|
hasNext, next, remove |
Methods inherited from interface java.io.Closeable |
---|
close |
Method Detail |
---|
void removeFromHistory(int trackCount)
trackCount
- how many tracks to remove. If Integer.MAX_VALUE
then
entire history should be cleaned up.void setRandom(Random random, TrackMetadataBean currentTrack)
Random.TRACK
is set.
random
- the random mode, never null
.currentTrack
- optional current track. When Random.ALBUM
, the
provider should start providing an album starting with this
track.void reset()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |