HandleThread

public final class HandleThread
extends ChunkHandler

java.lang.Object
   ↳ com.android.tradefed.device.server.jdwp.JdwpInterceptor
     ↳ com.android.tradefed.device.server.jdwp.chunkhandler.ChunkHandler
       ↳ com.android.tradefed.device.server.jdwp.chunkhandler.HandleThread


处理线程状态更新。

摘要

字段

public static final int CHUNK_STKL

public static final int CHUNK_THCR

public static final int CHUNK_THDE

public static final int CHUNK_THEN

public static final int CHUNK_THNM

public static final int CHUNK_THST

公共方法

void clientDisconnected(ClientImpl client)

客户端已消失。

void clientReady(ClientImpl client)

客户端已准备就绪。

void handleChunk(ClientImpl client, int type, ByteBuffer data, boolean isReply, int msgId)

块处理程序入口点。

static void register(MonitorThread mt)

注册我们预期会从客户端收到的数据包。

static void requestThreadStackCallRefresh(ClientImpl client, int threadId)
static void requestThreadUpdate(ClientImpl client)

从界面线程定期调用。

static void sendSTKL(ClientImpl client, int threadId)

向客户端发送 STKL(堆栈列表)请求。

static void sendTHEN(ClientImpl client, boolean enable)

向客户端发送 THEN(线程通知启用)请求。

字段

CHUNK_STKL

public static final int CHUNK_STKL

CHUNK_THCR

public static final int CHUNK_THCR

CHUNK_THDE

public static final int CHUNK_THDE

CHUNK_THEN

public static final int CHUNK_THEN

CHUNK_THNM

public static final int CHUNK_THNM

CHUNK_THST

public static final int CHUNK_THST

公共方法

clientDisconnected

public void clientDisconnected (ClientImpl client)

客户端已关闭。

参数
client ClientImpl

clientReady

public void clientReady (ClientImpl client)

客户端已准备就绪。

参数
client ClientImpl

handleChunk

public void handleChunk (ClientImpl client, 
                int type, 
                ByteBuffer data, 
                boolean isReply, 
                int msgId)

块处理程序入口点。

参数
client ClientImpl

type int

data ByteBuffer

isReply boolean

msgId int

注册

public static void register (MonitorThread mt)

注册我们预期会从客户端收到的数据包。

参数
mt MonitorThread

requestThreadStackCallRefresh

public static void requestThreadStackCallRefresh (ClientImpl client, 
                int threadId)

参数
client ClientImpl

threadId int

requestThreadUpdate

public static void requestThreadUpdate (ClientImpl client)

此方法会从界面线程定期调用。为了避免在请求更新时锁定界面,我们创建了一个新线程。

参数
client ClientImpl

sendSTKL

public static void sendSTKL (ClientImpl client, 
                int threadId)

向客户端发送 STKL(堆栈列表)请求。虚拟机会暂停目标线程,获取其堆栈,然后返回。如果线程不再运行,则会返回失败结果。

参数
client ClientImpl

threadId int

sendTHEN

public static void sendTHEN (ClientImpl client, 
                boolean enable)

向客户端发送 THEN(线程通知启用)请求。

参数
client ClientImpl

enable boolean