Package freenet.io.comm

Examples of freenet.io.comm.NotConnectedException


    try {
      BulkTransmitter bt =
        new BulkTransmitter(prb, peer, xferUID, true, ctr, true, cb);
      return bt.send();
    } catch (DisconnectedException e) {
      throw new NotConnectedException(e);
    }
  }
View Full Code Here


      long now = System.currentTimeMillis();
      long end = now + maxWaitInterval;
      while((now = System.currentTimeMillis()) < end) {
        if(done) {
          if(disconnected)
            throw new NotConnectedException();
          return;
        }
        int waitTime = (int) (Math.min(end - now, Integer.MAX_VALUE));
        try {
          wait(waitTime);
View Full Code Here

    if(logMINOR)
      Logger.minor(this, "Sending async: " + msg + " : " + cb + " on " + this+" for "+node.getDarknetPortNumber()+" priority "+msg.getPriority());
    if(!isConnected()) {
      if(cb != null)
        cb.disconnected();
      throw new NotConnectedException();
    }
    if(msg.getSource() != null) {
      Logger.error(this, "Messages should NOT be relayed as-is, they should always be re-created to clear any sub-messages etc, see comments in Message.java!: "+msg, new Exception("error"));
    }
    addToLocalNodeSentMessagesToStatistic(msg);
View Full Code Here

    node.usm.send(this, ping, node.dispatcher.pingCounter);
    Message msg;
    try {
      msg = node.usm.waitFor(MessageFilter.create().setTimeout(2000).setType(DMT.FNPPong).setField(DMT.PING_SEQNO, pingID), null);
    } catch(DisconnectedException e) {
      throw new NotConnectedException("Disconnected while waiting for pong");
    }
    return msg != null;
  }
View Full Code Here

TOP

Related Classes of freenet.io.comm.NotConnectedException

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.