|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xnap.util.launcher.DefaultLauncher org.xnap.util.launcher.DefaultPlayer
public class DefaultPlayer
Provides the default implements for the Player
interface.
Field Summary | |
---|---|
protected java.lang.Process |
player
The player process. |
Constructor Summary | |
---|---|
DefaultPlayer(java.lang.String key,
java.lang.String name,
java.lang.String command)
|
Method Summary | |
---|---|
boolean |
canPlay(java.io.File file)
Returns true for mp3 files. |
void |
enqueue(java.io.File file)
Executes DefaultLauncher.getCommand() , passing file as an
argument. |
void |
open(java.io.File file)
Calls stop() and enqueue(File) . |
void |
open(java.net.URL url)
Opens the given URL. |
void |
start()
Executes DefaultLauncher.getCommand() . |
void |
stop()
Calls destory() on the player process, if running. |
Methods inherited from class org.xnap.util.launcher.DefaultLauncher |
---|
getCommand, getKey, getName, isEditable, isEnabled, setCommand |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.xnap.util.launcher.Launcher |
---|
getCommand, getKey, getName, isEditable, isEnabled, setCommand |
Field Detail |
---|
protected java.lang.Process player
Constructor Detail |
---|
public DefaultPlayer(java.lang.String key, java.lang.String name, java.lang.String command)
Method Detail |
---|
public boolean canPlay(java.io.File file)
canPlay
in interface Player
public void enqueue(java.io.File file) throws java.io.IOException
DefaultLauncher.getCommand()
, passing file
as an
argument.
enqueue
in interface Player
java.io.IOException
public void open(java.io.File file) throws java.io.IOException
stop()
and enqueue(File)
.
open
in interface Launcher
open
in class DefaultLauncher
java.io.IOException
public void start() throws java.io.IOException
DefaultLauncher.getCommand()
.
start
in interface Player
java.io.IOException
public void stop()
destory()
on the player process, if running.
stop
in interface Player
public void open(java.net.URL url) throws java.io.IOException
Launcher
open
in interface Launcher
open
in class DefaultLauncher
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |