Package freenet.client.events

Examples of freenet.client.events.ExpectedHashesEvent


      progress = new SendingToNetworkMessage(identifier, global);
    } else if(ce instanceof SplitfileCompatibilityModeEvent) {
        handleCompatibilityMode((SplitfileCompatibilityModeEvent)ce, context);
        return;
    } else if(ce instanceof ExpectedHashesEvent) {
            ExpectedHashesEvent event = (ExpectedHashesEvent)ce;
        synchronized(this) {
            if(expectedHashes != null) {
                Logger.error(this, "Got a new ExpectedHashes", new Exception("debug"));
                return;
            } else {
View Full Code Here


          Logger.debug(this, res.type.name()+" : "+res.hashAsHex());
        }
      }
      HashResult[] clientHashes = hashes;
      if(persistent) clientHashes = HashResult.copy(hashes);
      ctx.eventProducer.produceEvent(new ExpectedHashesEvent(clientHashes), context);
     
      // So it is passed on.
      origHashes = hashes;
    } else {
      hashes = origHashes; // Inherit so it goes all the way to the top.
View Full Code Here

    final HashResult[] h = clientHashes;
    context.getJobRunner(persistent()).queueNormalOrDrop(new PersistentJob() {

            @Override
            public boolean run(ClientContext context) {
                ctx.eventProducer.produceEvent(new ExpectedHashesEvent(h), context);
                return false;
            }
       
    });
  }
View Full Code Here

            if(sentToNetwork)
                ret.receive(new SendingToNetworkEvent(), context);
            if(expectedHashes != null) {
                container.activate(expectedHashes, Integer.MAX_VALUE);
                if(expectedHashes.hashes != null)
                    ret.receive(new ExpectedHashesEvent(expectedHashes.hashes), context);
            }
            if(compatMessage != null) {
                container.activate(compatMessage, Integer.MAX_VALUE);
                SplitfileCompatibilityModeEvent e = compatMessage.toEvent();
                ret.receive(e, context);
View Full Code Here

TOP

Related Classes of freenet.client.events.ExpectedHashesEvent

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.