Exemplo n.º 1
0
 private MessageFuture send(MessagePromise promise) {
   Objects.requireNonNull(promise);
   long id = ID.incrementAndGet();
   promise.message().put(MESSAGE_ID, id);
   messageTracking.put(id, promise);
   clientHandler.sendMessage(promise);
   return promise;
 }
Exemplo n.º 2
0
 private MessageFuture send(Message message) {
   Objects.requireNonNull(message);
   long id = ID.incrementAndGet();
   message.put(MESSAGE_ID, id);
   MessagePromise promise = new DefaultMessagePromise(message, remoteAddress);
   messageTracking.put(id, promise);
   clientHandler.sendMessage(promise);
   return promise;
 }