DebugViewDumpHandler

public abstract class DebugViewDumpHandler
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.DebugViewDumpHandler


摘要

欄位

public static final int CHUNK_VUGL

啟用/停用 OpenGL 呼叫的追蹤功能。

public static final int CHUNK_VULW

列出這項程序的ViewRootImpl

public static final int CHUNK_VUOP

一般檢視作業,封包中的第一個參數應為下列 VUOP_* 常數之一。

public static final int CHUNK_VURT

檢視畫面根目錄上的作業,封包中的第一個參數應為 VURT_* 常數之一

公用建構函式

DebugViewDumpHandler(int chunkType)

公用方法

void clientDisconnected(ClientImpl client)

用戶端已離開。

void clientReady(ClientImpl client)

用戶端已準備就緒。

static String getString(ByteBuffer buf, int len)

公用函式,可從 ByteBuffer 複製字串。

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

處理傳入的區塊。

受保護的方法

abstract void handleViewDebugResult(ByteBuffer data)
void waitForResult(long timeout, TimeUnit unit)

欄位

CHUNK_VUGL

public static final int CHUNK_VUGL

啟用/停用 OpenGL 呼叫的追蹤功能。

CHUNK_VULW

public static final int CHUNK_VULW

列出這項程序的ViewRootImpl

CHUNK_VUOP

public static final int CHUNK_VUOP

一般檢視作業,封包中的第一個參數應為下列 VUOP_* 常數之一。

CHUNK_VURT

public static final int CHUNK_VURT

對檢視區塊根目錄執行的作業,封包中的第一個參數應為 VURT_* 常數之一

公用建構函式

DebugViewDumpHandler

public DebugViewDumpHandler (int chunkType)

參數
chunkType int

公用方法

clientDisconnected

public void clientDisconnected (ClientImpl client)

用戶端已離開。可用於清除與這個用戶端連線相關聯的任何資源。

參數
client ClientImpl

clientReady

public void clientReady (ClientImpl client)

用戶端已準備就緒。當用戶端判斷為 DDM 感知型 (通常是在收到 HELO 回應後),監控執行緒會在所有處理常式上呼叫這個方法。

處理常式可利用這個機會初始化用戶端活動。因為我們很有可能想傳送訊息給用戶端,所以這個方法可能會擲回 IOException。

參數
client ClientImpl

getString

public static String getString (ByteBuffer buf, 
                int len)

公用函式,可從 ByteBuffer 複製字串。

參數
buf ByteBuffer

len int

傳回
String

handleChunk

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

處理傳入的區塊。資料 (區塊類型為「type」) 會從「data」的開頭開始,並持續到 data.limit()。

如果設定了「isReply」,則「msgId」會是我們傳送給用戶端的請求 ID。 否則,就是用戶端為這個事件產生的 ID。請注意,回覆封包中可能包含我們未註冊的區塊。

處理常式不得修改「data」的內容。

參數
client ClientImpl

type int

data ByteBuffer

isReply boolean

msgId int

受保護的方法

handleViewDebugResult

protected abstract void handleViewDebugResult (ByteBuffer data)

參數
data ByteBuffer

waitForResult

protected void waitForResult (long timeout, 
                TimeUnit unit)

參數
timeout long

unit TimeUnit