|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--nl.madline.opendp500.JDPServer
Constructor Summary | |
JDPServer(JDPConfig config)
Default constructor |
Method Summary | |
void |
addPlayer(java.lang.String ip)
Add a player to the connected players-list |
JDPPlaylist |
addPlaylist()
Add a playlist with a default name and return the playlist |
JDPPlaylist |
addPlaylist(java.lang.String name)
Adds a playlist with the given name and returns it. |
void |
debugMsg(java.lang.String message)
Print a debugmessage to the console if debugging is enabled |
void |
deletePlayer(java.lang.String ip)
Remove a connected player by IP-address |
java.lang.String |
getAudioPath()
Get the default audiopath as given on the commandline |
JDPConfig |
getConfig()
|
java.lang.String |
getConnectedPlayers()
Get a String with all the connected players |
java.lang.String |
getCurrentMediaType()
Get the current media type |
java.lang.String |
getLastCommand()
Return the last command received by the player |
java.lang.String |
getMainCommand(java.lang.String command)
Returns the internal mainCommand. |
java.util.Hashtable |
getMainCommands()
Get a Hashtable with the translation-table for the player mainCommands and internal commands |
java.lang.String |
getNowPlaying()
Returns the currently playing file, or 'Not Playling' if there's not a file playing at the moment |
java.lang.String |
getOptionCommand(java.lang.String command)
Returns the internal optionCommand. |
java.util.Hashtable |
getOptionCommands()
Get a HAshtable with the translation-table for the player optionCommands and internal commands |
java.lang.String |
getPath(java.lang.String mediaType)
Get the root path of a certain mediaType |
java.lang.String |
getPicturePath()
Get the default picturepath as given on the commandline |
JDPPlaylist |
getPlaylist(java.lang.String name)
Get the playlist with a given name |
java.lang.String |
getPlaylistCommand(java.lang.String command)
Returns the internal playlistCommand. |
java.util.Hashtable |
getPlaylistCommands()
Get a Hashtable with the translation-table for the player playlistCommands and internal commands |
java.lang.String[] |
getPlaylists(java.lang.String mediaType)
Get all playlists from a certain media-type |
java.lang.String |
getProperty(java.lang.String property)
|
java.lang.String |
getRoot()
Get APPNAME and VERSION-string for the about-screen |
java.lang.String |
getVideoPath()
Get the default videopath as given on the commandline |
boolean |
isAllowedToConnect(java.lang.String ip)
|
void |
reloadConfig()
Reload the configuration from the file |
void |
removePlaylist(java.lang.String name)
Remove playlist by name |
void |
saveConfig()
Tell the config to save itself to disk |
void |
setAudioPath(java.lang.String audioPath)
Set the audioPath |
void |
setCurrentMediaType(java.lang.String currentMediaType)
Set the current media type |
void |
setLastCommand(java.lang.String string)
Set the lastCommand to a given value. |
void |
setNowPlaying(java.lang.String nowPlaying)
Set the nowPlaying-property |
void |
setPicturePath(java.lang.String picturePath)
Set the picturePath |
void |
setVideoPath(java.lang.String videoPath)
Set the videoPath |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JDPServer(JDPConfig config)
Method Detail |
public JDPPlaylist addPlaylist()
public void removePlaylist(java.lang.String name)
name
- The name of the playlist to be removedpublic JDPPlaylist addPlaylist(java.lang.String name)
name
- The name for the playlist
public java.lang.String[] getPlaylists(java.lang.String mediaType)
mediaType
- The mediatype (AUDIO, VIDEO, PICTURE)
public JDPPlaylist getPlaylist(java.lang.String name)
name
- The name of the playlist
public java.lang.String getAudioPath()
public void setAudioPath(java.lang.String audioPath)
audioPath
- The base path to the audio-filespublic java.lang.String getVideoPath()
public void setVideoPath(java.lang.String videoPath)
videoPath
- The base path to the video-filespublic java.lang.String getPicturePath()
public void setPicturePath(java.lang.String picturePath)
picturePath
- The base path to the picturespublic java.lang.String getRoot()
public java.lang.String getMainCommand(java.lang.String command)
command
- The command received from the player
public java.lang.String getPlaylistCommand(java.lang.String command)
command
- The command received from the player
public java.lang.String getOptionCommand(java.lang.String command)
command
- The command received from the player
public java.util.Hashtable getMainCommands()
public java.util.Hashtable getPlaylistCommands()
public java.util.Hashtable getOptionCommands()
public java.lang.String getPath(java.lang.String mediaType)
mediaType
- The media type (AUDIO/VIDEO/PICTURE)
public java.lang.String getNowPlaying()
public void setNowPlaying(java.lang.String nowPlaying)
nowPlaying
- The name of the file that is currently playingpublic java.lang.String getCurrentMediaType()
public void setCurrentMediaType(java.lang.String currentMediaType)
currentMediaType
- The media type the player is in right nowpublic java.lang.String getConnectedPlayers()
public void addPlayer(java.lang.String ip)
ip
- The IP-address of the new playerpublic void deletePlayer(java.lang.String ip)
ip
- The IP-address of the player to be removedpublic java.lang.String getLastCommand()
public void setLastCommand(java.lang.String string)
string
- The command received from the playerpublic java.lang.String getProperty(java.lang.String property)
property
- The property to be fetched
public boolean isAllowedToConnect(java.lang.String ip)
ip
- The IP of the connecting client
public void saveConfig()
public JDPConfig getConfig()
public void reloadConfig()
public void debugMsg(java.lang.String message)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |