public class MThread extends MObject implements Runnable
MThread class.
| Modifier and Type | Class and Description |
|---|---|
protected static class |
MThread.ThreadContainer |
| Modifier and Type | Field and Description |
|---|---|
protected static Log |
log
Constant
log |
protected String |
name |
protected Runnable |
task |
protected MThread.ThreadContainer |
tc |
| Constructor and Description |
|---|
MThread()
Constructor for MThread.
|
MThread(Runnable _task)
Constructor for MThread.
|
MThread(Runnable _task,
String _name)
Constructor for MThread.
|
MThread(String _name)
Constructor for MThread.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getName()
Getter for the field
name. |
int |
getPriority()
getPriority.
|
protected Runnable |
getTask()
Getter for the field
task. |
void |
run() |
void |
setName(String _name)
Setter for the field
name. |
void |
setPriority(int _p)
setPriority.
|
static void |
sleep(long _millisec)
Sleeps _millisec milliseconds.
|
MThread |
start()
start.
|
void |
stop()
stop.
|
void |
taskError(Throwable t)
taskError.
|
void |
throwException(Throwable throwable)
throwException.
|
base, base, createBase, forkBase, installBase, isBase, leaveBase, toStringprotected static Log log
logprotected Runnable task
protected String name
protected MThread.ThreadContainer tc
public MThread()
Constructor for MThread.
public MThread(Runnable _task)
Constructor for MThread.
_task - a Runnable object.public void setName(String _name)
Setter for the field name.
_name - a String object.public void setPriority(int _p)
setPriority.
_p - a int.public int getPriority()
getPriority.
public void stop()
stop.
public void throwException(Throwable throwable)
throwException.
throwable - a Throwable object.public static void sleep(long _millisec)
_millisec - a long.Copyright © 2016. All Rights Reserved.