public class PirateTunesClientThread extends ClientThread
JOggPlayerSocketServer
(TCPSocketServer
) to
deal with playing tunes through the Pi PirateAudio shield. Each time a SocketConnection comes in, this client Thread is spawned to handle the request.
It does all the Vorbis Ogg playing using the JOggPlayerListener
class.Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
(package private) long |
currentPlayerThreadId_ |
(package private) Thread |
looperThread_ |
protected String |
piSndOggRootDir_
The root dir for all ogg content with Artist/Album subDirs.
|
protected JOggPlayerListener |
player_
Class instance to the JOggPlayer.
|
(package private) Thread |
playerThread_ |
(package private) boolean |
responseExpected_
Flags if the command will send a response.
|
(package private) Vector<String> |
responses_
Any responses (if any) to send back to client.
|
protected boolean |
useOgg123_
Deprecated.
|
clientRequest, clientSocket, debug_, is, os
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
PirateTunesClientThread(Socket clientSocket)
Contstructor that accepts the clientSocket to grab data /command from.
|
Modifier and Type | Method and Description |
---|---|
static Vector<String> |
getCommandList() |
static Vector<String> |
getCommandWithNoOptionsList() |
void |
run()
The Overriden thread execution method.
|
protected int |
runWithJOggPlayer(String[] cmdArgs)
The primary method that parses the commad params and handles them by sending appropriate signals to JOggPlayerListener.
|
protected int |
runWithOgg123(String[] cmdArgs)
Deprecated.
|
int |
setPlayer(JOggPlayerListener player)
Deprecated.
|
getClientSocket, readOutput, setClientSocket
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
protected String piSndOggRootDir_
@Deprecated protected boolean useOgg123_
protected JOggPlayerListener player_
Thread playerThread_
Thread looperThread_
long currentPlayerThreadId_
Vector<String> responses_
boolean responseExpected_
public PirateTunesClientThread(Socket clientSocket)
clientSocket
- the clientSocket to grab data /command from@Deprecated public int setPlayer(JOggPlayerListener player)
@Deprecated protected int runWithOgg123(String[] cmdArgs)
cmdArgs
- the command requests received over the socketprotected int runWithJOggPlayer(String[] cmdArgs)
cmdArgs
- the command requests received over the socketpublic void run()
run
in interface Runnable
run
in class ClientThread
public static Vector<String> getCommandList()
public static Vector<String> getCommandWithNoOptionsList()
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses