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();
}