public class CallCAPIThread extends Thread
Thread.start()
method.
If you want to wait for the result at a certain point in your program,
invoke the Thread.join()
method.Thread.State, Thread.UncaughtExceptionHandler
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
CallCAPIThread(AbstractCAPI capi,
AbstractCAPICallRequest request)
Calls a CAPI function on a separate thread.
|
Modifier and Type | Method and Description |
---|---|
AbstractCAPI |
getCAPI()
Gets the CAPI used to call the function.
|
long |
getDuration()
Gets the time it took to call the function.
|
Exception |
getException()
Gets the exception thrown by the CAPI call.
|
AbstractCAPICallRequest |
getRequest()
Gets the request used to the call the function.
|
AbstractCAPICallResult |
getResult()
Gets the result returned by the function.
|
void |
run() |
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 CallCAPIThread(AbstractCAPI capi, AbstractCAPICallRequest request)
capi
- the CAPI to use to call the function.request
- the input parameters for this call.public AbstractCAPI getCAPI()
public AbstractCAPICallRequest getRequest()
public AbstractCAPICallResult getResult()
AbstractCAPICallResult
to the generated result file normally returned by the CAPI call.public Exception getException()
CallException
.public long getDuration()
See http://www.xins.org/.