Package net.tomp2p.message

Examples of net.tomp2p.message.Message.messageId()


    }
   
    LOG.debug("Received late response from slow peer: {}", realMessage);
      // only the case when a unreachable peer makes a request to another slow, unreachable peer
      Map<Integer, FutureResponse> pendingRequests = dispatcher().getPendingRequests();
      FutureResponse pendingRequest = pendingRequests.remove(realMessage.messageId());
      if (pendingRequest != null) {
        // we waited for this response, answer it
        pendingRequest.response(realMessage);

        // send ok, not fire and forget - style
View Full Code Here


    List<Message> content = listener.getBuffer();
    assertEquals(first.messageId(), content.get(0).messageId());
    assertEquals(second.messageId(),content.get(1).messageId());
    assertEquals(third.messageId(), content.get(2).messageId());
    assertEquals(fourth.messageId(), content.get(3).messageId());
    assertEquals(fifth.messageId(), content.get(4).messageId());
  }
 
  @Test
  public void testGarbageCollect() throws InvalidKeyException, SignatureException, IOException, InterruptedException {
    CountingBufferListener listener = new CountingBufferListener();
View Full Code Here

        replyMessage.recipient(requestMessage.sender());
        replyMessage.sender(peerAddress);
        replyMessage.command(requestMessage.command());
        replyMessage.type(replyType);
        replyMessage.version(requestMessage.version());
        replyMessage.messageId(requestMessage.messageId());
        replyMessage.udp(requestMessage.isUdp());
        return replyMessage;
    }

    /**
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.