public abstract class AbstractManagedThread extends Thread implements javax.enterprise.concurrent.ManageableThread
ManagedThreadFactoryImpl.createThread(java.lang.Runnable, org.glassfish.enterprise.concurrent.spi.ContextHandle)
Thread.State, Thread.UncaughtExceptionHandler
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
AbstractManagedThread(Runnable target) |
Modifier and Type | Method and Description |
---|---|
abstract String |
getTaskIdentityName()
Return the identity name of the task that is being run on this thread.
|
abstract long |
getTaskRunTime(long now)
Return the time in millisecond since the task has started.
|
abstract long |
getThreadStartTime()
Return the time that the thread was started, measured in milliseconds,
between the current time and midnight, January 1, 1970 UTC.
|
boolean |
isShutdown() |
void |
shutdown()
Marks the thread for shutdown so application components could
check the status of this thread and finish any work as soon
as possible.
|
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, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public AbstractManagedThread(Runnable target)
public boolean isShutdown()
isShutdown
in interface javax.enterprise.concurrent.ManageableThread
public void shutdown()
public abstract String getTaskIdentityName()
public abstract long getTaskRunTime(long now)
now
- The current time in milliseconds, which is typically obtained
by calling System.currentTimeMillis()
public abstract long getThreadStartTime()
Copyright © 1996-2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.