Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] Exception propagation during file transfer

Hi Scott,
Do you consider this a proposal good enough to start working on? If you do, I'd be happy to give it a go and submit a patch. If you feel that there's more to discuss before that, perhaps we could do a quick skype call?

Regards,
Thomas Hallgren

Thomas Hallgren wrote:
Hi Scott,

Scott Lewis wrote:
... Yes. Some thoughts on design/approach (please give ideas about how/how well this addresses your use case):

1) IFileTransfer could be enhanced with a method

Job IFileTransfer.getJob()

...so that after the event.receive(OutputStream) successfully completed, the IFileTransfer.getJob() would return a non-null Job instance. Clients could then call job.join()

2) API could be added (directly on or adapter for IRetrieveFileTransferContainerAdapter) to allow the Job instance to be constructed by clients...which would allow them to create a subclass of FileTransferJob that overrode the

boolean FileTransferJob.belongsTo(Object)

I think I would prefer 2, because it gives clients more control (i.e. they can create whatever Job instance type they prefer, before initiating file transfer).

So perhaps a method like this could be added to IRetrieveFileTransferContainerAdapter

public void setJobFactory(IRetrieveFileTransferJobFactory factory);

Where IRetrieveFileTransferJobFactory factory looked something like this:

public interface IRetrieveFileTransferJobFactory {

public FileTransferJob createFileTransferJob(IFileID fileID);

}

So how does this sound?

I like this and I would like both #1 and #2.

Thanks,
Thomas Hallgren

_______________________________________________
ecf-dev mailing list
ecf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ecf-dev



Back to the top