FileDocCategorySizeDatePackage
HandleTest.javaAPI DocAndroid 1.5 API2241Wed May 06 22:41:08 BST 2009com.android.ddmlib

HandleTest

public final class HandleTest extends ChunkHandler
Handle thread status updates.

Fields Summary
public static final int
CHUNK_TEST
private static final HandleTest
mInst
Constructors Summary
private HandleTest()



      
Methods Summary
public voidclientDisconnected(Client client)
Client went away.

public voidclientReady(Client client)
Client is ready.

public voidhandleChunk(Client client, int type, java.nio.ByteBuffer data, boolean isReply, int msgId)
Chunk handler entry point.


        Log.d("ddm-test", "handling " + ChunkHandler.name(type));

        if (type == CHUNK_TEST) {
            handleTEST(client, data);
        } else {
            handleUnknownChunk(client, type, data, isReply, msgId);
        }
    
private voidhandleTEST(Client client, java.nio.ByteBuffer data)

        /*
         * Can't call data.array() on a read-only ByteBuffer, so we make
         * a copy.
         */
        byte[] copy = new byte[data.limit()];
        data.get(copy);

        Log.d("ddm-test", "Received:");
        Log.hexDump("ddm-test", LogLevel.DEBUG, copy, 0, copy.length);
    
public static voidregister(MonitorThread mt)
Register for the packets we expect to get from the client.

        mt.registerChunkHandler(CHUNK_TEST, mInst);