01: package com.rimfaxe.thread;
02:
03: /** The MutableRunnable Interface describes an interface which creates an
04: * owned thread by an object. It also provides access to that thread. The
05: * MutableRunnable object retains it's own priority and name such that when the
06: * crateThread method is invoked, the priority and name of the new thread
07: * is the same as the old thread.
08: * @author Pueschel
09: */
10:
11: public interface MutableRunnable extends Runnable {
12:
13: /** The start method is the standard Thread start method which will result
14: * in starting the thread at the currently set priority.
15: */
16: public void start();
17:
18: /** The start(int) method starts the thread with a passed parameter for the
19: * priority. This is a convenience method.
20: */
21: //public void start(int aPriority);
22: /** The setPriority(int) method is a method to set the thread priority. The
23: * passed parameter is an integer describing the thread priority.
24: */
25: public void setPriority(int aPriority);
26:
27: /** The create method creates a new thread which is owned by the
28: * MutableRunnable object.
29: */
30: public void createThread();
31:
32: /** setName(String) sets the thread name to the passed parameter string value.
33: */
34: public void setName(java.lang.String aName);
35:
36: /** getName() returns the thread name string
37: */
38: public String getName();
39:
40: /** The isAlive method provides the test for isAlive required for monitoring thread status
41: *
42: */
43: public boolean isAlive();
44:
45: }
|