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

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


    // send message directly to the peer with the given peer address
    FutureDirect futureDirect = networkManager.getConnection().getPeer()
        .sendDirect(message.getTargetAddress()).setObject(encryptedMessage).start();
    // attach a future listener to log, handle and notify events
    FutureDirectListener listener = new FutureDirectListener(message, targetPublicKey, this);
    futureDirect.addListener(listener);
    boolean success = listener.await();

    if (success) {
      logger.debug("Message (direct) sent. Message ID = '{}', Target address = '{}', Sender address = '{}'.",
          message.getMessageID(), message.getTargetAddress(), message.getSenderAddress());
    } else {
View Full Code Here

TOP

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

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.