public String getPathNull() { return _path; } public TransferIndex getTransferIndex() { return _transferIndex; } public InetSocketAddress getAddress() { return _address; } public void abort(String reason) { synchronized (_rslave) { if (_status.isFinished()) { // no need to abort a transfer that isn't transferring return; } try { _rslave.issueAbortToSlave(getTransferIndex(), reason); } catch (SlaveUnavailableException e) { _status = new TransferStatus(getTransferIndex(), e); } } } public void receiveFile(String path, char type, long position, long speed) throws IOException, SlaveUnavailableException { _path = path; String index = _rslave.issueReceiveToSlave(path, type, position, getTransferIndex(),speed); _state = Transfer.TRANSFER_RECEIVING_UPLOAD; try { _rslave.fetchResponse(index); } catch (RemoteIOException e) { throw (IOException) e.getCause(); } } public void sendFile(String path, char type, long position, long speed) throws IOException, SlaveUnavailableException { _path = path; String index = _rslave.issueSendToSlave(path, type, position, getTransferIndex(),speed); _state = Transfer.TRANSFER_SENDING_DOWNLOAD; try { _rslave.fetchResponse(index); } catch (RemoteIOException e) { throw (IOException) e.getCause(); } }