Interface IFileTransferConnectStartEvent
-
- All Superinterfaces:
Event
,org.eclipse.core.runtime.IAdaptable
,IFileTransferEvent
public interface IFileTransferConnectStartEvent extends org.eclipse.core.runtime.IAdaptable, IFileTransferEvent
Event sent toIFileTransferListener
associated withIIncomingFileTransfer
orIOutgoingFileTransferEvent
orIRemoteFileSystemRequest
instances.The event is send before the first request is send to the server. It allows the caller to get a handle to the transfer so that it can be canceled. A transfer may have to send several requests to one (or more servers) until the retrieved or send data itself is send or received. The entire phase before this is referred here as connect phase.
If
connectUsingJob(FileTransferJob)
is called then the connect phase is performed in a job. If not the caller may implement their own thread in which it can cancel the request. The expectation is that the cancellation will react with little delay, typically in less than 1 second.Not all providers support this event.
- Since:
- 3.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
cancel()
Cancel file transfer.void
connectUsingJob(FileTransferJob connectJob)
Connect using a job.IFileID
getFileID()
FileTransferJob
prepareConnectJob(FileTransferJob connectJob)
Prepare custom connect job or get default connect job.
-
-
-
Method Detail
-
getFileID
IFileID getFileID()
-
cancel
void cancel()
Cancel file transfer.
-
prepareConnectJob
FileTransferJob prepareConnectJob(FileTransferJob connectJob)
Prepare custom connect job or get default connect job.As a result the connect job will be tied to the transfer. Only if the returned job is passed into
connectUsingJob(FileTransferJob)
will it actually be scheduled to run.- Parameters:
connectJob
- A subclass ofFileTransferJob
to use to run the connection process. Ifnull
, the provider will use create and prepare a default connect job. NOTE: the given job should *not* be scheduled/started prior to being provided as a parameter to this method.- Returns:
- passed in job or default connect job if parameter connectJob was null.
-
connectUsingJob
void connectUsingJob(FileTransferJob connectJob)
Connect using a job.The passed in connectJob must have been prepared using
prepareConnectJob(FileTransferJob)
. The job may be scheduled after the caller returns from handling of theIFileTransferConnectStartEvent
. As this is provider implementation specific it must not relied on.- Parameters:
connectJob
- A subclass ofFileTransferJob
to use to run the connection process. Must not benull
. NOTE: the given job should *not* be scheduled/started prior to being provided as a parameter to this method.
-
-