/// <summary> /// Chunk handler entry point. /// </summary> internal override void handleChunk(Client client, int type, ByteBuffer data, bool isReply, int msgId) { Log.d("ddm-nativeheap", "handling " + ChunkHandler.name(type)); if (type == CHUNK_NHGT) { handleNHGT(client, data); } else if (type == CHUNK_NHST) { // start chunk before any NHSG chunk(s) client.clientData.nativeHeapData.clearHeapData(); } else if (type == CHUNK_NHEN) { // end chunk after NHSG chunk(s) client.clientData.nativeHeapData.sealHeapData(); } else if (type == CHUNK_NHSG) { handleNHSG(client, data); } else { handleUnknownChunk(client, type, data, isReply, msgId); } client.update(Client.CHANGE_NATIVE_HEAP_DATA); }
/// <summary> /// Chunk handler entry point. /// </summary> internal override void handleChunk(Client client, int type, ByteBuffer data, bool isReply, int msgId) { Log.d("ddm-prof", "handling " + ChunkHandler.name(type)); if (type == CHUNK_MPRE) { handleMPRE(client, data); } else if (type == CHUNK_MPSE) { handleMPSE(client, data); } else if (type == CHUNK_MPRQ) { handleMPRQ(client, data); } else if (type == CHUNK_FAIL) { handleFAIL(client, data); } else { handleUnknownChunk(client, type, data, isReply, msgId); } }
/// <summary> /// Chunk handler entry point. /// </summary> internal override void handleChunk(Client client, int type, ByteBuffer data, bool isReply, int msgId) { Log.d("ddm-thread", "handling " + ChunkHandler.name(type)); if (type == CHUNK_THCR) { handleTHCR(client, data); } else if (type == CHUNK_THDE) { handleTHDE(client, data); } else if (type == CHUNK_THST) { handleTHST(client, data); } else if (type == CHUNK_THNM) { handleTHNM(client, data); } else if (type == CHUNK_STKL) { handleSTKL(client, data); } else { handleUnknownChunk(client, type, data, isReply, msgId); } }
/// <summary> /// Chunk handler entry point. /// </summary> internal override void handleChunk(Client client, int type, ByteBuffer data, bool isReply, int msgId) { Log.d("ddm-test", "handling " + ChunkHandler.name(type)); if (type == CHUNK_TEST) { handleTEST(client, data); } else { handleUnknownChunk(client, type, data, isReply, msgId); } }
/// <summary> /// Chunk handler entry point. /// </summary> internal override void handleChunk(Client client, int type, ByteBuffer data, bool isReply, int msgId) { Log.d("ddm-appname", "handling " + ChunkHandler.name(type)); if (type == CHUNK_APNM) { Debug.Assert(!isReply); handleAPNM(client, data); } else { handleUnknownChunk(client, type, data, isReply, msgId); } }
/// <summary> /// Chunk handler entry point. /// </summary> internal override void handleChunk(Client client, int type, ByteBuffer data, bool isReply, int msgId) { Log.d("ddm-hello", "handling " + ChunkHandler.name(type)); if (type == CHUNK_HELO) { Debug.Assert(isReply); handleHELO(client, data); } else if (type == CHUNK_FEAT) { handleFEAT(client, data); } else { handleUnknownChunk(client, type, data, isReply, msgId); } }
/* * Process an incoming DDM packet. If this is a reply to an earlier request, * "handler" will be set to the handler responsible for the original * request. The spec allows a JDWP message to include multiple DDM chunks. */ private void callHandler(Client client, JdwpPacket packet, ChunkHandler handler) { // on first DDM packet received, broadcast a "ready" message if (!client.ddmSeen()) { broadcast(CLIENT_READY, client); } ByteBuffer buf = packet.payload; int type, length; bool reply = true; type = buf.getInt(); length = buf.getInt(); if (handler == null) { // not a reply, figure out who wants it lock (mHandlerMap) { handler = mHandlerMap[type]; reply = false; } } if (handler == null) { Log.w("ddms", "Received unsupported chunk type " + ChunkHandler.name(type) + " (len=" + length + ")"); } else { Log.d("ddms", "Calling handler for " + ChunkHandler.name(type) + " [" + handler + "] (len=" + length + ")"); ByteBuffer ibuf = buf.slice(); ByteBuffer roBuf = ibuf.asReadOnlyBuffer(); // enforce R/O roBuf.order = ChunkHandler.CHUNK_ORDER; // do the handling of the chunk synchronized on the client list // to be sure there's no concurrency issue when we look for HOME // in hasApp() lock (mClientList) { handler.handleChunk(client, type, roBuf, reply, packet.id); } } }
/// <summary> /// Chunk handler entry point. /// </summary> internal override void handleChunk(Client client, int type, ByteBuffer data, bool isReply, int msgId) { Log.d("ddm-heap", "handling " + ChunkHandler.name(type)); if (type == CHUNK_HPIF) { handleHPIF(client, data); } else if (type == CHUNK_HPST) { handleHPST(client, data); } else if (type == CHUNK_HPEN) { handleHPEN(client, data); } else if (type == CHUNK_HPSG) { handleHPSG(client, data); } else if (type == CHUNK_HPDU) { handleHPDU(client, data); } else if (type == CHUNK_HPDS) { handleHPDS(client, data); } else if (type == CHUNK_REAQ) { handleREAQ(client, data); } else if (type == CHUNK_REAL) { handleREAL(client, data); } else { handleUnknownChunk(client, type, data, isReply, msgId); } }