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

HandleWait

public final class HandleWait extends ChunkHandler
Handle the "wait" chunk (WAIT). These are sent up when the client is waiting for something, e.g. for a debugger to attach.

Fields Summary
public static final int
CHUNK_WAIT
private static final HandleWait
mInst
Constructors Summary
private HandleWait()



      
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-wait", "handling " + ChunkHandler.name(type));

        if (type == CHUNK_WAIT) {
            assert !isReply;
            handleWAIT(client, data);
        } else {
            handleUnknownChunk(client, type, data, isReply, msgId);
        }
    
private static voidhandleWAIT(Client client, java.nio.ByteBuffer data)

        byte reason;

        reason = data.get();

        Log.i("ddm-wait", "WAIT: reason=" + reason);


        ClientData cd = client.getClientData();
        synchronized (cd) {
            cd.setDebuggerConnectionStatus(ClientData.DEBUGGER_WAITING);
        }

        client.update(Client.CHANGE_DEBUGGER_INTEREST);
    
public static voidregister(MonitorThread mt)
Register for the packets we expect to get from the client.

        mt.registerChunkHandler(CHUNK_WAIT, mInst);