public class JavascriptHandler extends Thread
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
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.
|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
JavascriptHandler(UploadPolicy uploadPolicy,
JUploadPanel theJUploadPanel)
Constructor for JavascriptHandler
|
Modifier and Type | Method and Description |
---|---|
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()
|
void |
run()
Method to run when thread is started.
|
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
public static final String COMMAND_START_UPLOAD
public static final String RETURN_BUSY
public static final String RETURN_STARTED
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 commandspublic String doCommand(String command)
command
- public void clearCommand()
public void doWait() throws InterruptedException
InterruptedException
Copyright © 2015. All rights reserved.