|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.musicontroller.DJImpl
public class DJImpl
| Constructor Summary | |
|---|---|
DJImpl()
|
|
| Method Summary | |
|---|---|
Song |
choose()
Lets the DJ choose a new Song to play, using the SongSelector to select a song from the candidates generated by the CandidateSelector |
void |
confirmPlay()
Call this when the currently playing Song has been played completely. |
void |
confirmSkip()
Call this when the currently playing Song has indeed be skipped. |
CandidateSelector |
getCandidateSelector()
|
Song |
getCurrentSong()
|
MusiController |
getMusiController()
|
int |
getPlayingTime()
|
java.util.List<java.lang.Long> |
getRequests()
|
SongSelector |
getSongSelector()
|
IUser |
getUser()
|
boolean |
mustSkip()
|
void |
onSongAdded(Song song)
Will be called when a new Song object was created. |
void |
onSongChanged(Song song)
Will be called when an existing Song was changed (edited). |
void |
onSongDeleted(Song song)
Will be called when an existing Song was deleted. |
java.util.List<java.lang.Long> |
peek(int count)
Takes a look into the future, and tells which Songs will be played next. |
void |
playSong(long songid)
Tells the DJ to skip the currently playing Song, and start playing a new one. |
void |
requestSong(long songid)
Requests a song. |
void |
setCandidateSelector(CandidateSelector selector)
|
void |
setMusiController(MusiController musicontroller)
|
void |
setPlaying(boolean playing)
Sets the state of the DJ. |
void |
setPlayingTime(int millis)
To be used by the StreamService, to provide feedback to the DJ about the amount of milliseconds that have been played of the current ssong. |
void |
setSongSelector(SongSelector selector)
|
void |
setUser(IUser user)
|
void |
skipSong()
Tells the DJ to skip the currently playing Song. |
void |
unrequestSong(long songid)
Unrequests a previously requested Song. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DJImpl()
| Method Detail |
|---|
public void setPlaying(boolean playing)
DJ
setPlaying in interface DJplaying - Use True, if the DJ is playing or False otherwise.public void setMusiController(MusiController musicontroller)
setMusiController in interface DJpublic MusiController getMusiController()
getMusiController in interface DJpublic SongSelector getSongSelector()
getSongSelector in interface DJpublic void setSongSelector(SongSelector selector)
setSongSelector in interface DJpublic CandidateSelector getCandidateSelector()
getCandidateSelector in interface DJpublic void setCandidateSelector(CandidateSelector selector)
setCandidateSelector in interface DJpublic Song choose()
DJ
choose in interface DJpublic void requestSong(long songid)
DJ
requestSong in interface DJsongid - The Id of the Song.public void unrequestSong(long songid)
DJ
unrequestSong in interface DJsongid - The Id of the Song.public void skipSong()
DJ
skipSong in interface DJpublic boolean mustSkip()
mustSkip in interface DJpublic void confirmSkip()
DJ
confirmSkip in interface DJpublic void confirmPlay()
DJ
confirmPlay in interface DJpublic void playSong(long songid)
DJ
playSong in interface DJsongid - The Id of the new Song to be played.public java.util.List<java.lang.Long> getRequests()
getRequests in interface DJpublic void setUser(IUser user)
setUser in interface DJpublic IUser getUser()
getUser in interface DJpublic Song getCurrentSong()
getCurrentSong in interface DJpublic java.util.List<java.lang.Long> peek(int count)
DJ
peek in interface DJcount - The amount of Songs to predict (maxed at 15).
public void setPlayingTime(int millis)
DJ
setPlayingTime in interface DJmillis - The amount of milliseconds the current song has been played.public int getPlayingTime()
getPlayingTime in interface DJpublic void onSongAdded(Song song)
SongChangeListener
onSongAdded in interface SongChangeListenersong - The new Song.public void onSongChanged(Song song)
SongChangeListener
onSongChanged in interface SongChangeListenersong - The changed Song.public void onSongDeleted(Song song)
SongChangeListener
onSongDeleted in interface SongChangeListenersong - The deleted Song.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||