Home | History | Annotate | Download | only in server

Lines Matching defs:clientInfo

76     private final HashMap<Messenger, ClientInfo> mClients = new HashMap<>();
79 private final SparseArray<ClientInfo> mIdToClientInfoMap= new SparseArray<>();
126 ClientInfo cInfo = null;
133 cInfo = new ClientInfo(c, msg.replyTo);
229 private boolean requestLimitReached(ClientInfo clientInfo) {
230 if (clientInfo.mClientIds.size() >= ClientInfo.MAX_LIMIT) {
231 if (DBG) Slog.d(TAG, "Exceeded max outstanding requests " + clientInfo);
237 private void storeRequestMap(int clientId, int globalId, ClientInfo clientInfo, int what) {
238 clientInfo.mClientIds.put(clientId, globalId);
239 clientInfo.mClientRequests.put(clientId, what);
240 mIdToClientInfoMap.put(globalId, clientInfo);
243 private void removeRequestMap(int clientId, int globalId, ClientInfo clientInfo) {
244 clientInfo.mClientIds.delete(clientId);
245 clientInfo.mClientRequests.delete(clientId);
251 ClientInfo clientInfo;
271 clientInfo = mClients.get(msg.replyTo);
273 if (requestLimitReached(clientInfo)) {
285 storeRequestMap(msg.arg2, id, clientInfo, msg.what);
295 clientInfo = mClients.get(msg.replyTo);
298 id = clientInfo.mClientIds.get(msg.arg2);
304 removeRequestMap(msg.arg2, id, clientInfo);
314 clientInfo = mClients.get(msg.replyTo);
315 if (requestLimitReached(clientInfo)) {
324 storeRequestMap(msg.arg2, id, clientInfo, msg.what);
334 clientInfo = mClients.get(msg.replyTo);
336 id = clientInfo.mClientIds.get(msg.arg2);
342 removeRequestMap(msg.arg2, id, clientInfo);
353 clientInfo = mClients.get(msg.replyTo);
356 if (clientInfo.mResolvedService != null) {
364 clientInfo.mResolvedService = new NsdServiceInfo();
365 storeRequestMap(msg.arg2, id, clientInfo, msg.what);
386 ClientInfo clientInfo = mIdToClientInfoMap.get(id);
387 if (clientInfo == null) {
394 int clientId = clientInfo.getClientId(id);
413 clientInfo.mChannel.sendMessage(NsdManager.SERVICE_FOUND, 0,
419 clientInfo.mChannel.sendMessage(NsdManager.SERVICE_LOST, 0,
424 clientInfo.mChannel.sendMessage(NsdManager.DISCOVER_SERVICES_FAILED,
430 clientInfo.mChannel.sendMessage(NsdManager.REGISTER_SERVICE_SUCCEEDED,
435 clientInfo.mChannel.sendMessage(NsdManager.REGISTER_SERVICE_FAILED,
463 clientInfo.mResolvedService.setServiceName(name);
464 clientInfo.mResolvedService.setServiceType(type);
465 clientInfo.mResolvedService.setPort(Integer.parseInt(cooked[4]));
466 clientInfo.mResolvedService.setTxtRecords(cooked[6]);
469 removeRequestMap(clientId, id, clientInfo);
473 storeRequestMap(clientId, id2, clientInfo, NsdManager.RESOLVE_SERVICE);
475 clientInfo.mChannel.sendMessage(NsdManager.RESOLVE_SERVICE_FAILED,
477 clientInfo.mResolvedService = null;
483 removeRequestMap(clientId, id, clientInfo);
484 clientInfo.mResolvedService = null;
485 clientInfo.mChannel.sendMessage(NsdManager.RESOLVE_SERVICE_FAILED,
491 removeRequestMap(clientId, id, clientInfo);
492 clientInfo.mResolvedService = null;
493 clientInfo.mChannel.sendMessage(NsdManager.RESOLVE_SERVICE_FAILED,
499 clientInfo.mResolvedService.setHost(InetAddress.getByName(cooked[4]));
500 clientInfo.mChannel.sendMessage(NsdManager.RESOLVE_SERVICE_SUCCEEDED,
501 0, clientId, clientInfo.mResolvedService);
503 clientInfo.mChannel.sendMessage(NsdManager.RESOLVE_SERVICE_FAILED,
507 removeRequestMap(clientId, id, clientInfo);
508 clientInfo.mResolvedService = null;
768 for (ClientInfo client : mClients.values()) {
808 private class ClientInfo {
822 private ClientInfo(AsyncChannel c, Messenger m) {