FileDocCategorySizeDatePackage
ThreadInfo.javaAPI DocAndroid 1.5 API3109Wed May 06 22:41:08 BST 2009com.android.ddmlib

ThreadInfo

public final class ThreadInfo extends Object implements IStackTraceInfo
Holds a thread information.

Fields Summary
private int
mThreadId
private String
mThreadName
private int
mStatus
private int
mTid
private int
mUtime
private int
mStime
private boolean
mIsDaemon
private StackTraceElement[]
mTrace
private long
mTraceTime
Constructors Summary
ThreadInfo(int threadId, String threadName)
Construct with basic identification.

        mThreadId = threadId;
        mThreadName = threadName;

        mStatus = -1;
        //mTid = mUtime = mStime = 0;
        //mIsDaemon = false;
    
Methods Summary
public longgetStackCallTime()
Returns the approximate time of the stacktrace data.

see
#getStackTrace()

        return mTraceTime;
    
public java.lang.StackTraceElement[]getStackTrace()

        return mTrace;
    
public intgetStatus()
Returns the VM thread status.

        return mStatus;
    
public intgetStime()
Returns the cumulative system time.

        return mStime;
    
public intgetThreadId()
Returns the thread's ID.

        return mThreadId;
    
public java.lang.StringgetThreadName()
Returns the thread's name.

        return mThreadName;
    
public intgetTid()
Returns the system tid.

        return mTid;
    
public intgetUtime()
Returns the cumulative user time.

        return mUtime;
    
public booleanisDaemon()
Returns whether this is a daemon thread.

        return mIsDaemon;
    
voidsetStackCall(java.lang.StackTraceElement[] trace)
Sets the stack call of the thread.

param
trace stackcall information.

        mTrace = trace;
        mTraceTime = System.currentTimeMillis();
    
voidsetThreadName(java.lang.String name)

        mThreadName = name;
    
voidupdateThread(int status, int tid, int utime, int stime, boolean isDaemon)
Set with the values we get from a THST chunk.


        mStatus = status;
        mTid = tid;
        mUtime = utime;
        mStime = stime;
        mIsDaemon = isDaemon;