Package net.tomp2p.futures

Examples of net.tomp2p.futures.FutureResponse.failed()


        if(msg.command() == Commands.RCON.getNr() && msg.type() == Type.OK) {
          LOG.debug("Successfully set up the reverse connection to peer {}", message.recipient().peerId());
          rconResponse.response(msg);
        } else {
          LOG.debug("Could not acquire a reverse connection to peer {}", message.recipient().peerId());
          rconResponse.failed("Could not acquire a reverse connection");
          futureResponse.failed(rconResponse.failedReason());
        }
      }
    };
   
View Full Code Here


                  final PeerConnection peerConnection = futurePeerConnection.object();
                 
                  // send the message
                  send(peerConnection, peer.peerBean(), peer.connectionBean(), config, futureResponse);
                } else {
                    futureResponse.failed(fpc);
                }
            }
        });
   
    return futureResponse;
View Full Code Here

            byte[] me;
            try {
                me = Utils.encodeJavaObject(sendDirectBuilder.object());
                message.buffer(new Buffer(Unpooled.wrappedBuffer(me)));
            } catch (IOException e) {
                futureResponse.failed("cannot convert object", e);
            }      
        }

        return new RequestHandler<FutureResponse>(futureResponse, peerBean(), connectionBean(),
                sendDirectBuilder);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.