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)
将“handler”注册为类型“type”的处理程序。 |
void
|
run()
监控来自客户端和调试器的活动。 |
公共方法
addClient
public void addClient (ClientImpl client)
向我们监控的事项列表中添加了新客户。此外,还会将客户端的渠道和客户端的调试器监听器添加到选择列表中。此方法应仅从一个线程(即 VMWatcherThread)调用,以避免“alreadyOpen”和客户端创建之间出现竞态条件。
| 参数 | |
|---|---|
client |
ClientImpl |
dropClient
public void dropClient (ClientImpl client, boolean notify)
从监控器中移除客户端。
这将锁定正在运行的 client 的 IDevice 的 ClientImpl 列表。
dropClients
public void dropClients (clients, boolean notify)
从监控器中舍弃所提供的客户端列表。这将锁定每个客户端的 IDevice 运行的 ClientImpl 列表。
| 参数 | |
|---|---|
clients |
|
notify |
boolean |
getRetryOnBadHandshake
public boolean getRetryOnBadHandshake ()
如果希望在收到错误的 JDWP 握手响应时重试与客户端的连接,则返回“true”;如果希望仅将客户端标记为错误并将其搁置,则返回“false”。
| 返回 | |
|---|---|
boolean |
|
quit
public void quit ()
告知线程停止。从界面线程调用。
registerChunkHandler
public void registerChunkHandler (int type,
ChunkHandler handler)将“handler”注册为类型“type”的处理程序。
| 参数 | |
|---|---|
type |
int |
handler |
ChunkHandler |
得分
public void run ()
留意来自客户端和调试器的活动。