Package org.hive2hive.core.network.messages.futures

Examples of org.hive2hive.core.network.messages.futures.FutureRoutedListener


    FutureSend futureSend = networkManager.getConnection().getPeer()
        .send(Number160.createHash(message.getTargetKey())).setObject(encryptedMessage)
        .setRequestP2PConfiguration(createSendingConfiguration()).start();

    // attach a future listener to log, handle and notify events
    FutureRoutedListener listener = new FutureRoutedListener(message, targetPublicKey, this);
    futureSend.addListener(listener);
    boolean success = listener.await();

    if (success) {
      logger.debug("Message sent. Target key = '{}', Message ID = '{}'.",
          message.getTargetKey(), message.getMessageID());
    } else {
View Full Code Here

TOP

Related Classes of org.hive2hive.core.network.messages.futures.FutureRoutedListener

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.