Package net.tomp2p.futures

Examples of net.tomp2p.futures.FutureGet.addListener()


  @Override
  public NetworkContent get(IParameters parameters) {
    FutureGet futureGet = getUnblocked(parameters);
    FutureGetListener listener = new FutureGetListener(parameters);
    futureGet.addListener(listener);
    return listener.awaitAndGet();
  }

  public NetworkContent getVersion(IParameters parameters) {
    FutureGet futureGet = getUnblocked(parameters);
View Full Code Here


  }

  public NetworkContent getVersion(IParameters parameters) {
    FutureGet futureGet = getUnblocked(parameters);
    FutureGetListener listener = new FutureGetListener(parameters);
    futureGet.addListener(listener);
    return listener.awaitAndGet();
  }

  @Override
  public NetworkContent getUserProfileTask(String userId) {
View Full Code Here

        .from(new Number640(parameters.getLKey(), parameters.getDKey(), Number160.ZERO,
            Number160.ZERO))
        .to(new Number640(parameters.getLKey(), parameters.getDKey(), Number160.MAX_VALUE,
            Number160.MAX_VALUE)).ascending().returnNr(1).start();
    FutureGetListener listener = new FutureGetListener(parameters);
    futureGet.addListener(listener);
    return listener.awaitAndGet();
  }

  public FutureGet getUnblocked(IParameters parameters) {
    logger.debug("Get. {}", parameters.toString());
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.