|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
wjhk.jupload2.JavascriptHandler
public class JavascriptHandler
Separate thread spawned by the (signed) applet at initialization time so it will run in a context with the same privileges. Does nothing but wait to be notified of the presence of a command to be executed in the jsCommand String variable.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
Thread.State, Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
static String |
COMMAND_START_UPLOAD
Command code, for upload. |
static String |
RETURN_BUSY
One return code for doCommand: indicates that the thread is busy, and can execute this command. |
static String |
RETURN_STARTED
One return code for doCommand: indicates that the thread is busy, and can execute this command. |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
JavascriptHandler(UploadPolicy uploadPolicy,
JUploadPanel theJUploadPanel)
Constructor for JavascriptHandler |
|
| Method Summary | |
|---|---|
void |
clearCommand()
Synchronized method allows for safely clearing jsCommand string |
String |
doCommand(String command)
Method for passing a command (String) to be executed (asynchronously) by the run() method of this object's thread. |
void |
doWait()
Synchronized method to enable call to wait() |
String |
getCommand()
Synchronized method allows for safely accessing jsCommand string |
void |
run()
Method to run when thread is started. |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, 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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String COMMAND_START_UPLOAD
public static final String RETURN_BUSY
public static final String RETURN_STARTED
| Constructor Detail |
|---|
public JavascriptHandler(UploadPolicy uploadPolicy,
JUploadPanel theJUploadPanel)
uploadPolicy - The current upload policy. Used for debug output.theJUploadPanel - Whose methods will will be invoked in order to
execute the received commands| Method Detail |
|---|
public String doCommand(String command)
command -
public String getCommand()
public void clearCommand()
public void doWait()
throws InterruptedException
InterruptedExceptionpublic void run()
run in interface Runnablerun in class Thread
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||