Package freenet.node

Examples of freenet.node.RequestClient


    this.clientToken = clientToken2;
    this.global = global;
    if(persistence == Persistence.CONNECTION) {
      this.origHandler = handler;
      client = null;
      lowLevelClient = new RequestClient() {

        @Override
        public boolean persistent() {
          return false;
        }
View Full Code Here


      System.err.println("Succeeded inserts: "+successes+" of "+INSERTED_BLOCKS+" in "+(endInsertsTime-startInsertsTime)+"ms");
     
      FetchContext fctx = client.getFetchContext();
      fctx.maxNonSplitfileRetries = 0;
      fctx.maxSplitfileBlockRetries = 0;
      RequestClient requestContext = new RequestClient() {

        @Override
        public boolean persistent() {
          return false;
        }
View Full Code Here

    long now = System.currentTimeMillis();
    for(ClientRequester request : requests) {
      if(request.isFinished() || request.isCancelled())
        continue;
      row = table.addChild("tr");
      RequestClient client = request.getClient();
      row.addChild("td", client.toString());
      try {
        String s = request.toString();
        if(s.indexOf(':') > s.indexOf('@')) {
          s = s.substring(0, s.indexOf(':'));
        }
        row.addChild("td", s);
      } catch (Throwable t) {
        // FIXME shouldn't happen...
        row.addChild("td", "ERROR: "+request.getClass().toString());
      }
      long diff = now - request.creationTime;
      StringBuilder sb = new StringBuilder();
      sb.append(TimeUtil.formatTime(diff, 2));
      row.addChild("td", sb.toString());
      row.addChild("td", Short.toString(request.getPriorityClass()));
      row.addChild("td", client==null ? "?" : Boolean.toString(client.realTimeFlag()));
      FreenetURI uri = request.getURI(); // getURI() sometimes returns null, eg for ClientPutters
      row.addChild("td", uri == null ? "null" : uri.toString());
    }
  }
View Full Code Here

        }
        return requestGrabber;
    }
   
    public void reregisterAll(ClientRequester request, RequestScheduler lock, ClientContext context, short oldPrio) {
        RequestClient client = request.getClient();
        short newPrio = request.getPriorityClass();
        if(newPrio == oldPrio) {
            Logger.error(this, "Changing priority from "+oldPrio+" to "+newPrio+" for "+request);
            return;
        }
View Full Code Here

                System.out.println("Priority "+i+" : empty");
            else {
                System.out.println("Priority "+i+" : "+prio.size());
                    System.out.println("Clients: "+prio.size()+" for "+prio);
                    for(int k=0;k<prio.size();k++) {
                        RequestClient client = prio.getClient(k);
                        System.out.println("Client "+k+" : "+client);
                        ClientRequestRGANode requestGrabber = prio.getGrabber(client);
                        System.out.println("SRGA for client: "+requestGrabber);
                        for(int l=0;l<requestGrabber.size();l++) {
                            ClientRequestSchedulerGroup cr = requestGrabber.getClient(l);
View Full Code Here

 

  public WoTMessageManager(ExtObjectContainer myDB, IdentityManager myIdentityManager, Freetalk myFreetalk, PluginRespirator myPluginRespirator) {
    super(myDB, myIdentityManager, myFreetalk, myPluginRespirator);
   
    mRequestClient = new RequestClient() {

      public boolean persistent() {
        return false;
      }
View Full Code Here

TOP

Related Classes of freenet.node.RequestClient

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.