Interface IFileTransferConnectStartEvent
- All Superinterfaces:
Event
,org.eclipse.core.runtime.IAdaptable
,IFileTransferEvent
IFileTransferListener
associated with
IIncomingFileTransfer
or
IOutgoingFileTransferEvent
or
IRemoteFileSystemRequest
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
Modifier and TypeMethodDescriptionvoid
cancel()
Cancel file transfer.void
connectUsingJob
(FileTransferJob connectJob) Connect using a job.prepareConnectJob
(FileTransferJob connectJob) Prepare custom connect job or get default connect job.Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
-
Method Details
-
getFileID
IFileID getFileID() -
cancel
void cancel()Cancel file transfer. -
prepareConnectJob
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
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.
-