Ejemplo n.º 1
0
 @Override
 public void sendMessage(ILocationSpecifier loc, IMessage message, IRequestSender requestSender) {
   ConnectionInstance connectionInstance = instancesMapping.get(loc);
   int xid = XidGenerator.generateXid();
   message.setXid(xid);
   messagesMapping.put(xid, message);
   connectionInstance.sendRequest(message, requestSender);
   requestSendersMapping.put(xid, requestSender);
 }
Ejemplo n.º 2
0
 public Response handleResponse(IMessage message) {
   IRequestSender iRequestSender = requestSendersMapping.get(message.getXid());
   iRequestSender.onSuccess(message);
   return okResponse();
 }