HandleTestpublic 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 void | clientDisconnected(Client client)Client went away.
| public void | clientReady(Client client)Client is ready.
| public void | handleChunk(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 void | handleTEST(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 void | register(MonitorThread mt)Register for the packets we expect to get from the client.
mt.registerChunkHandler(CHUNK_TEST, mInst);
|
|