HandleAppNamepublic final class HandleAppName extends ChunkHandler Handle the "app name" chunk (APNM). |
Fields Summary |
---|
public static final int | CHUNK_APNM | private static final HandleAppName | mInst |
Constructors Summary |
---|
private HandleAppName()
|
Methods Summary |
---|
public void | clientDisconnected(Client client)Client went away.
| public void | clientReady(Client client)Client is ready.
| private static void | handleAPNM(Client client, java.nio.ByteBuffer data)
int appNameLen;
String appName;
appNameLen = data.getInt();
appName = getString(data, appNameLen);
Log.i("ddm-appname", "APNM: app='" + appName + "'");
ClientData cd = client.getClientData();
synchronized (cd) {
cd.setClientDescription(appName);
}
client = checkDebuggerPortForAppName(client, appName);
if (client != null) {
client.update(Client.CHANGE_NAME);
}
| public void | handleChunk(Client client, int type, java.nio.ByteBuffer data, boolean isReply, int msgId)Chunk handler entry point.
Log.d("ddm-appname", "handling " + ChunkHandler.name(type));
if (type == CHUNK_APNM) {
assert !isReply;
handleAPNM(client, data);
} else {
handleUnknownChunk(client, type, data, isReply, msgId);
}
| public static void | register(MonitorThread mt)Register for the packets we expect to get from the client.
mt.registerChunkHandler(CHUNK_APNM, mInst);
|
|