result.onTimeout(removeDeferredResultRunnable);
//将异步上下文加入到队列中,这样在未来可以推送消息
Queue<DeferredResult<String>> queue = usernameToDeferredResultMap.get(username);
if(queue == null) {
queue = new ConcurrentLinkedDeque();
usernameToDeferredResultMap.put(username, queue);
}
queue.add(result);
return result;