Package org.hive2hive.core.network.messages.direct

Examples of org.hive2hive.core.network.messages.direct.BaseDirectMessage


        logger.trace("Skipping to send a message to myself.");
        continue;
      }

      try {
        BaseDirectMessage message = messageFactory.createPrivateNotificationMessage(peerAddress);
        if (message == null) {
          logger.info("Not notifying any of the own peers because the message to be sent is null.");
        } else {
          sendDirect(message, ownPublicKey);
        }
View Full Code Here


  private void notifyMasterPeer(List<PeerAddress> peerList, BaseNotificationMessageFactory messageFactory, String userId,
      PublicKey publicKey) {
    boolean success = false;
    while (!success && !peerList.isEmpty()) {
      PeerAddress initial = NetworkUtils.choseFirstPeerAddress(peerList);
      BaseDirectMessage msg = messageFactory.createHintNotificationMessage(initial, userId);
      try {
        sendDirect(msg, publicKey);
        success = true;
      } catch (SendFailedException e) {
        if (!peerList.isEmpty()) {
View Full Code Here

TOP

Related Classes of org.hive2hive.core.network.messages.direct.BaseDirectMessage

Copyright © 2018 www.massapicom. 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.