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 | ||
Summary
Fields | |
|---|---|
public
static
final
int |
CHUNK_VUGL
Enable/Disable tracing of OpenGL calls. |
public
static
final
int |
CHUNK_VULW
List |
public
static
final
int |
CHUNK_VUOP
Generic View Operation, first parameter in the packet should be one of the VUOP_* constants below. |
public
static
final
int |
CHUNK_VURT
Operation on view root, first parameter in packet should be one of VURT_* constants |
Public constructors | |
|---|---|
DebugViewDumpHandler(int chunkType)
|
|
Public methods | |
|---|---|
void
|
clientDisconnected(ClientImpl client)
Client has gone away. |
void
|
clientReady(ClientImpl client)
Client is ready. |
static
String
|
getString(ByteBuffer buf, int len)
Utility function to copy a String out of a ByteBuffer. |
void
|
handleChunk(ClientImpl client, int type, ByteBuffer data, boolean isReply, int msgId)
Handle an incoming chunk. |
Protected methods | |
|---|---|
abstract
void
|
handleViewDebugResult(ByteBuffer data)
|
void
|
waitForResult(long timeout, TimeUnit unit)
|
Fields
CHUNK_VUGL
public static final int CHUNK_VUGL
Enable/Disable tracing of OpenGL calls.
CHUNK_VULW
public static final int CHUNK_VULW
List ViewRootImpl's of this process.
CHUNK_VUOP
public static final int CHUNK_VUOP
Generic View Operation, first parameter in the packet should be one of the VUOP_* constants below.
CHUNK_VURT
public static final int CHUNK_VURT
Operation on view root, first parameter in packet should be one of VURT_* constants
Public constructors
DebugViewDumpHandler
public DebugViewDumpHandler (int chunkType)
| Parameters | |
|---|---|
chunkType |
int |
Public methods
clientDisconnected
public void clientDisconnected (ClientImpl client)
Client has gone away. Can be used to clean up any resources associated with this client connection.
| Parameters | |
|---|---|
client |
ClientImpl |
clientReady
public void clientReady (ClientImpl client)
Client is ready. The monitor thread calls this method on all handlers when the client is determined to be DDM-aware (usually after receiving a HELO response.)
The handler can use this opportunity to initialize client-side activity. Because there's a fair chance we'll want to send a message to the client, this method can throw an IOException.
| Parameters | |
|---|---|
client |
ClientImpl |
getString
public static String getString (ByteBuffer buf,
int len)Utility function to copy a String out of a ByteBuffer.
| Parameters | |
|---|---|
buf |
ByteBuffer |
len |
int |
| Returns | |
|---|---|
String |
|
handleChunk
public void handleChunk (ClientImpl client, int type, ByteBuffer data, boolean isReply, int msgId)
Handle an incoming chunk. The data, of chunk type "type", begins at the start of "data" and continues to data.limit().
If "isReply" is set, then "msgId" will be the ID of the request we sent to the client. Otherwise, it's the ID generated by the client for this event. Note that it's possible to receive chunks in reply packets for which we are not registered.
The handler may not modify the contents of "data".
| Parameters | |
|---|---|
client |
ClientImpl |
type |
int |
data |
ByteBuffer |
isReply |
boolean |
msgId |
int |
Protected methods
handleViewDebugResult
protected abstract void handleViewDebugResult (ByteBuffer data)
| Parameters | |
|---|---|
data |
ByteBuffer |
waitForResult
protected void waitForResult (long timeout,
TimeUnit unit)| Parameters | |
|---|---|
timeout |
long |
unit |
TimeUnit |