Package org.hive2hive.core.network.messages.request

Examples of org.hive2hive.core.network.messages.request.IRequestMessage


    this.messageManager = messageManager;
  }

  protected void send(BaseMessage message, PublicKey receiverPublicKey) throws SendFailedException {
    if (message instanceof IRequestMessage) {
      IRequestMessage requestMessage = (IRequestMessage) message;
      requestMessage.setCallBackHandler(this);
    }
    boolean success = messageManager.send(message, receiverPublicKey);
    if (!success) {
      throw new SendFailedException();
    }
View Full Code Here


  }

  protected void sendDirect(BaseDirectMessage message, PublicKey receiverPublicKey)
      throws SendFailedException {
    if (message instanceof IRequestMessage) {
      IRequestMessage requestMessage = (IRequestMessage) message;
      requestMessage.setCallBackHandler(this);
    }

    boolean success = messageManager.sendDirect(message, receiverPublicKey);
    if (!success)
      throw new SendFailedException();
View Full Code Here

    return new RequestP2PConfiguration(1, 10, 0);
  }

  private void configureCallbackHandlerIfNeeded(BaseMessage message) {
    if (message instanceof IRequestMessage) {
      IRequestMessage requestMessage = (IRequestMessage) message;
      callBackHandlers.put(message.getMessageID(), requestMessage.getCallBackHandler());
      requestMessage.setCallBackHandler(null);
    }
  }
View Full Code Here

TOP

Related Classes of org.hive2hive.core.network.messages.request.IRequestMessage

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.