public class IstiNotifyThread extends IstiThread
DEFAULT_TERMINATE_WAIT_TIME, terminateFlag
Constructor and Description |
---|
IstiNotifyThread(java.lang.Runnable target,
java.lang.String name)
Allocates a new
IstiNotifyThread object. |
IstiNotifyThread(java.lang.String name)
Allocates a new
IstiNotifyThread object. |
IstiNotifyThread(java.lang.ThreadGroup group,
java.lang.Runnable target,
java.lang.String name)
Allocates a new
IstiNotifyThread object so that it has
target as its run object, has the specified
name as its name, and belongs to the thread group
referred to by group . |
IstiNotifyThread(java.lang.ThreadGroup group,
java.lang.String name)
Allocates a new
IstiNotifyThread object. |
Modifier and Type | Method and Description |
---|---|
static void |
sleep(long millis)
Deprecated.
Use 'waitForNotify()' instead.
|
void |
terminate()
Performs a thread-notify and terminates this thread if the thread
is not terminated and alive.
|
clearThreadWaitNotifyFlag, isTerminated, nextThreadNum, notifyThread, start, terminate, waitForNotify, waitForNotify, waitForTerminate, waitForTerminate, wasStarted
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, stop, stop, suspend, toString, yield
public IstiNotifyThread(java.lang.Runnable target, java.lang.String name)
IstiNotifyThread
object. This constructor
has the same effect as IstiNotifyThread(null, target, name)
.target
- the object whose run
method is called.name
- the name of the new thread.public IstiNotifyThread(java.lang.String name)
IstiNotifyThread
object. This constructor
has the same effect as IstiNotifyThread(null, null, name)
.name
- the name of the new thread.public IstiNotifyThread(java.lang.ThreadGroup group, java.lang.Runnable target, java.lang.String name)
IstiNotifyThread
object so that it has
target
as its run object, has the specified
name
as its name, and belongs to the thread group
referred to by group
.
If group
is null
, the group is
set to be the same ThreadGroup as
the thread that is creating the new thread.
If there is a security manager, its checkAccess
method is called with the ThreadGroup as its argument.
This may result in a SecurityException.
If the target
argument is not null
, the
run
method of the target
is called when
this thread is started. If the target argument is
null
, this thread's run
method is called
when this thread is started.
The priority of the newly created thread is set equal to the
priority of the thread creating it, that is, the currently running
thread. The method setPriority
may be used to
change the priority to a new value.
The newly created thread is initially marked as being a daemon
thread if and only if the thread creating it is currently marked
as a daemon thread. The method setDaemon
may be used
to change whether or not a thread is a daemon.
group
- the thread group.target
- the object whose run
method is called.name
- the name of the new thread.java.lang.SecurityException
- if the current thread cannot create a
thread in the specified thread group.public IstiNotifyThread(java.lang.ThreadGroup group, java.lang.String name)
IstiNotifyThread
object. This constructor has
the same effect as IstiNotifyThread(group, null, name)
group
- the thread group.name
- the name of the new thread.java.lang.SecurityException
- if the current thread cannot create a
thread in the specified thread group.public void terminate()
terminate
in class IstiThread
public static void sleep(long millis) throws java.lang.InterruptedException
millis
- the length of time to sleep in milliseconds.java.lang.InterruptedException
- if another thread has interrupted
the current thread. The interrupted status of the
current thread is cleared when this exception is thrown.Object.notify()