MonitorThread
public
final
class
MonitorThread
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.device.server.MonitorThread |
監控公開連線。
摘要
公用方法 | |
|---|---|
void
|
addClient(ClientImpl client)
將新用戶端新增至我們監控的項目清單。 |
static
MonitorThread
|
createInstance()
建立並傳回用戶端監控執行緒的單例模式例項。 |
void
|
dropClient(ClientImpl client, boolean notify)
從監控器中捨棄用戶端。 |
void
|
dropClients(
從監控器中捨棄提供的用戶端清單。 |
DdmJdwpExtension
|
getDdmExtension()
|
static
MonitorThread
|
getInstance()
取得用戶端監控執行緒的單例模式例項。 |
boolean
|
getRetryOnBadHandshake()
如果我們想在收到錯誤的 JDWP 交握回應時重試連線至用戶端,則傳回「true」;如果只想將用戶端標示為錯誤並放任不管,則傳回「false」。 |
void
|
quit()
要求執行緒停止。 |
void
|
registerChunkHandler(int type, ChunkHandler handler)
Register "handler" as the handler for type "type". |
void
|
run()
監控用戶端和偵錯工具的活動。 |
公用方法
addClient
public void addClient (ClientImpl client)
在我們監控的項目清單中新增用戶端。也會將用戶端的管道和用戶端的偵錯工具監聽器新增至選取清單。為避免「alreadyOpen」和 Client 建立之間發生競爭情形,這項作業只能從一個執行緒 (VMWatcherThread) 呼叫。
| 參數 | |
|---|---|
client |
ClientImpl |
dropClient
public void dropClient (ClientImpl client, boolean notify)
從監控器中捨棄用戶端。
這會鎖定ClientImpl正在IDevice執行的client清單。
dropClients
public void dropClients (clients, boolean notify)
從監控器中捨棄提供的用戶端清單。這會鎖定每個用戶端執行的 ClientImpl
IDevice 清單。
| 參數 | |
|---|---|
clients |
|
notify |
boolean |
getRetryOnBadHandshake
public boolean getRetryOnBadHandshake ()
如果收到錯誤的 JDWP 交握回應,且我們想重試與用戶端的連線,則傳回「true」;如果只想將用戶端標示為錯誤並放任不管,則傳回「false」。
| 傳回 | |
|---|---|
boolean |
|
結束
public void quit ()
要求執行緒停止。從 UI 執行緒呼叫。
registerChunkHandler
public void registerChunkHandler (int type,
ChunkHandler handler)將「handler」註冊為「type」類型的處理常式。
| 參數 | |
|---|---|
type |
int |
handler |
ChunkHandler |
得分
public void run ()
監控來自用戶端和偵錯工具的活動。