Bugzilla – Bug 695
Changes in urlcopy thirdPartyTransfer() to allow event notification when (parallel) urlcopy transfers are complete.
Last modified: 2005-12-05 17:38:28
You need to log in before you can comment on or make changes to this bug.
At the moment, an UrlCopyListener registered to an UrlCopy object will receive a transfer(-1,-1) when doing a thirdPartyTransfer(). Indicating that, because of a thirdPartyTransfer, there will be no further progress reports. The fireUrlTransferProgressEvent( -1, -1 ) is called before the actual datatransfer: srcFTP.setType(FTPCommon.BINARY); dstFTP.setType(FTPCommon.BINARY); if (listeners != null) { fireUrlTransferProgressEvent(-1, -1); } srcFTP.copy(srcUrl.getPath(), dstFTP, dstUrl.getPath(), false, null); srcFTP.disconnect(); dstFTP.disconnect(); This way clients performing thirdParty UrlCopies only know that a copy() has finished because the method no longer blocks and returns. This way it is not possible to do parallel ThirdParty transfers: UrlCopy copyer = new UrlCopy(); copyer.setCredentials( GlobusProxy.getDefaultUserProxy() ); copyer.setSourceUrl( sourceUrl ); copyer.setDestinationUrl( targetUrl ); copyer.setUseThirdPartyCopy( true ); copyer.addUrlCopyListener( this ); Thread copyerThread = new Thread(copyer); copyerThread.setDaemon( true ); copyerThread.start(); // No way of knowing when copy has finished` Perhaps it is better to define a new method in the UrlCopyListener interface (say: transferComplete()), that is called only when an UrlCopy has completed. ------- Additional Comments From Jarek Gawor 2002-07-02 11:38 ------- I added transferCompleted() to the UrlCopyListener as suggested. Please let us know if that is sufficient to you. ------- Additional Comments From Jarek Gawor 2002-07-02 11:39 ------- The fix was commited to cvs.