public abstract class AbstractInvocable extends Base implements Invocable, InvocableInOrder, PriorityTask, Serializable
Base.LoggingWriter, Base.StackFrameLOG_ALWAYS, LOG_DEBUG, LOG_ERR, LOG_INFO, LOG_MAX, LOG_MIN, LOG_QUIET, LOG_WARN, POWER_0, POWER_G, POWER_K, POWER_M, POWER_T, UNIT_D, UNIT_H, UNIT_M, UNIT_MS, UNIT_NS, UNIT_S, UNIT_USSCHEDULE_FIRST, SCHEDULE_IMMEDIATE, SCHEDULE_STANDARD, TIMEOUT_DEFAULT, TIMEOUT_NONE| Constructor and Description |
|---|
AbstractInvocable() |
| Modifier and Type | Method and Description |
|---|---|
long |
getExecutionTimeoutMillis()
Obtain the maximum amount of time this task is allowed to run before
the corresponding service will attempt to stop it.
|
long |
getRequestTimeoutMillis()
Obtain the maximum amount of time a calling thread is willing to wait for
a result of the request execution.
|
Object |
getResult()
Determine the result from the invocation of this object.
|
int |
getSchedulingPriority()
Obtain this task's scheduling priority.
|
InvocationService |
getService()
Obtain the containing InvocationService.
|
void |
init(InvocationService service)
Called by the InvocationService exactly once on this Invocable object
as part of its initialization.
|
boolean |
isRespondInOrder()
Determine whether this Invocable object has to preserve the order of
responses according to the order of requests.
|
void |
runCanceled(boolean fAbandoned)
This method will be called if and only if all attempts to interrupt this
task were unsuccessful in stopping the execution or if the execution was
canceled before it had a chance to run at all.
|
protected void |
setResult(Object oResult)
Set the result of the invocation.
|
azzert, azzert, azzert, azzertFailed, breakLines, breakLines, capitalize, checkNotEmpty, checkNotNull, checkRange, computeSafeWaitTime, decimalValue, dup, dup, ensureBigDecimal, ensureClassLoader, ensureRuntimeException, ensureRuntimeException, equals, equalsDeep, err, err, err, err, err, escape, formatDateTime, getCallerStackFrame, getCommonMonitor, getCommonMonitor, getCommonMonitor, getContextClassLoader, getContextClassLoader, getDeepMessage, getErr, getLastSafeTimeMillis, getLog, getMaxDecDigits, getMaxHexDigits, getOriginalException, getOut, getProcessRandom, getRandom, getRandomBinary, getRandomBinary, getRandomString, getSafeTimeMillis, getStackFrame, getStackFrames, getStackTrace, getStackTrace, getThreadFactory, getTimeZone, getUpTimeMillis, hashCode, hexValue, indentString, indentString, isDecimal, isHex, isLogEcho, isOctal, log, log, log, log, log, makeInteger, makeLong, makeThread, mod, mod, octalValue, out, out, out, out, out, pad, parseBandwidth, parseBandwidth, parseDelimitedString, parseHex, parseHex, parseMemorySize, parseMemorySize, parsePercentage, parseTime, parseTime, parseTimeNanos, parseTimeNanos, printStackTrace, randomize, randomize, randomize, randomize, read, read, read, read, read, read, read, replace, setErr, setLog, setLogEcho, setOut, sleep, toBandwidthString, toBandwidthString, toCharEscape, toCrc, toCrc, toCrc, toCrc, toCrc, toDecString, toDelimitedString, toDelimitedString, toDelimitedString, toDelimitedString, toHex, toHex, toHexDump, toHexEscape, toHexEscape, toHexEscape, toHexEscape, toHexString, toMemorySizeString, toMemorySizeString, toQuotedCharEscape, toQuotedStringEscape, toSqlString, toString, toString, toStringEscape, toUnicodeEscape, trace, trace, trace, trace, trace, trace, trace, trace, trace, truncateString, truncateString, waitpublic void init(InvocationService service)
public Object getResult()
public boolean isRespondInOrder()
This implementation returns "false".
isRespondInOrder in interface InvocableInOrderpublic int getSchedulingPriority()
This implementation returns SCHEDULE_STANDARD.
getSchedulingPriority in interface PriorityTaskpublic long getExecutionTimeoutMillis()
The value of TIMEOUT_DEFAULT indicates a default
timeout value configured for the corresponding service; the value of
TIMEOUT_NONE indicates that this task can execute
indefinitely.
If, by the time the specified amount of time passed, the task has not
finished, the service will attempt to stop the execution by using the
Thread.interrupt() method. In the case that interrupting the
thread does not result in the task's termination, the
PriorityTask.runCanceled(boolean) method will be called.
This implementation returns TIMEOUT_DEFAULT.
getExecutionTimeoutMillis in interface PriorityTaskpublic void runCanceled(boolean fAbandoned)
Since this method is usually called on a service thread, implementors must exercise extreme caution since any delay introduced by the implementation will cause a delay of the corresponding service.
This implementation is a no-op.
runCanceled in interface PriorityTaskfAbandoned - true if the task has timed-out, but all attempts to
interrupt it were unsuccessful in stopping the execution;
otherwise the task was never startedpublic long getRequestTimeoutMillis()
The value of TIMEOUT_DEFAULT indicates a default
timeout value configured for the corresponding service; the value of
TIMEOUT_NONE indicates that the client thread is
willing to wait indefinitely until the task execution completes or is
canceled by the service due to a task execution timeout specified by the
PriorityTask.getExecutionTimeoutMillis() value.
If the specified amount of time elapsed and the client has not received
any response from the server, an RequestTimeoutException will
be thrown to the caller.
This implementation returns TIMEOUT_DEFAULT.
getRequestTimeoutMillis in interface PriorityTaskpublic InvocationService getService()
protected void setResult(Object oResult)
oResult - the invocation result