Package dijjer.io.comm

Examples of dijjer.io.comm.RetrievalException


          } catch (InterruptedException e) {
          }
        }
      }
      if (_prb.isAborted()) {
        throw new RetrievalException(_prb.getAbortReason(), _prb.getAbortDescription());
      }
      _os.write(_prb.getPacket(currentPacket).getData());
      currentPacket++;
    }
  }
View Full Code Here


        }
        continue;
      }
      if ((m1 != null) && m1.getSpec().equals(DMT.sendAborted)) {
        _prb.abort(m1.getInt(DMT.REASON), m1.getString(DMT.DESCRIPTION));
        throw new RetrievalException(m1.getInt(DMT.REASON), m1.getString(DMT.DESCRIPTION));
      }
      if ((m1 == null) || (m1.getSpec().equals(DMT.allSent))) {
        if (consecutiveMissingPacketReports >= MAX_CONSECUTIVE_MISSING_PACKET_REPORTS) {
          _prb.abort(RetrievalException.SENDER_DIED, "Sender unresponsive to resend requests");
          LinkedList rem = new LinkedList();
          rem.add(_sender);
          // TODO: This is a stupid work around for BlockTransferTest and needs to be fixed
          if (RoutingTable.getRoutingTable() != null)
          RoutingTable.getRoutingTable().removePeers(rem, "Failed to send data after acking request");
          throw new RetrievalException(RetrievalException.SENDER_DIED,
              "Sender unresponsive to resend requests");
        }
        LinkedList missing = new LinkedList();
        for (int x = 0; x < _prb.getNumPackets(); x++) {
          if (!_prb.isReceived(x)) {
View Full Code Here

TOP

Related Classes of dijjer.io.comm.RetrievalException

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.