Package com.sun.jini.thread
Class WakeupManager.ThreadDesc
java.lang.Object
com.sun.jini.thread.WakeupManager.ThreadDesc
- Enclosing class:
- WakeupManager
Description of a future thread.
-
Constructor Summary
ConstructorsConstructorDescriptionEquivalent toThreadDesc(ThreadGroup group, boolean daemon) Equivalent toThreadDesc(ThreadGroup group, boolean daemon, int priority) Describe a future thread that will be created in the given group, deamon status, and priority. -
Method Summary
Modifier and TypeMethodDescriptiongetGroup()TheThreadGroupthe thread will be created in.intThe priority the thread should be created with.booleanisDaemon()Returnstrueif the the thread will be daemon thread, returnsfalseotherwise.Create a thread for the given runnable based on the values in this object.toString()
-
Constructor Details
-
ThreadDesc
public ThreadDesc()Equivalent toThreadDesc(null, false) -
ThreadDesc
Equivalent toThreadDesc(group, deamon, Thread.NORM_PRIORITY) -
ThreadDesc
Describe a future thread that will be created in the given group, deamon status, and priority.- Parameters:
group- The group to be created in. Ifnull, the thread will be created in the default group.daemon- The thread will be a daemon thread if this istrue.priority- The thread's priority.- Throws:
IllegalArgumentException- if priority is not in betweenThread.MIN_PRIORITYandThread.MAX_PRIORITY
-
-
Method Details
-
getGroup
TheThreadGroupthe thread will be created in.- Returns:
- the
ThreadGroupthe thread will be created in.
-
isDaemon
public boolean isDaemon()Returnstrueif the the thread will be daemon thread, returnsfalseotherwise.- Returns:
trueif the the thread will be daemon thread, returnsfalseotherwise.
-
getPriority
public int getPriority()The priority the thread should be created with.- Returns:
- the priority the thread should be created with.
-
thread
Create a thread for the given runnable based on the values in this object. May be overridden to give full control over creation of thread.- Returns:
- a thread to run
r, unstarted
-
toString
-