org.eclipse.ecf.filetransfer

## Class FileTransferJob

- java.lang.Object
- - org.eclipse.core.runtime.PlatformObject
  - - org.eclipse.core.internal.jobs.InternalJob
    - - org.eclipse.core.runtime.jobs.Job
      - - org.eclipse.ecf.filetransfer.FileTransferJob

All Implemented Interfaces:
  Comparable, org.eclipse.core.runtime.IAdaptable

    public class FileTransferJob
    extends org.eclipse.core.runtime.jobs.Job

`Job` subclass for executing file transfers. This class should be subclassed to create a customized `Job` for passing to an incoming or outgoing file transfer. For example, to use a custom job for doing a file transfer retrieval via `IIncomingFileTransferReceiveStartEvent.receive(java.io.File, FileTransferJob)`:

     class MyFileTransferJob extends FileTransferJob {
                    public MyFileTransferJob(String name) {
                            super(name);
                    }

                    public boolean belongsTo(Object o) {
                            // insert own logic to decide whether
                    // this file transfer job should be part
                    // of a group
                    //
                    }
     }

     MyFileTransferJob myJob = new MyFileTransferJob("myname");
     incomingfiletransfer = event.receive(outputstream,myJob);

Since:
  2.0

### Field Summary

### Fields inherited from class org.eclipse.core.runtime.jobs.Job

`ASYNC_FINISH, BUILD, DECORATE, INTERACTIVE, LONG, NONE, RUNNING, SHORT, SLEEPING, WAITING`

### Fields inherited from class org.eclipse.core.internal.jobs.InternalJob

`manager`

### Constructor Summary

Constructors
Constructor and Description
`FileTransferJob(String name)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected void` `canceling()`
`protected org.eclipse.core.runtime.IStatus` `run(org.eclipse.core.runtime.IProgressMonitor mntr)`
`void` `setFileTransfer(IFileTransfer fileTransfer)`
`void` `setFileTransferRunnable(IFileTransferRunnable fileTransferRunnable)`

### Methods inherited from class org.eclipse.core.runtime.jobs.Job

`addJobChangeListener, belongsTo, cancel, create, create, createSystem, createSystem, createSystem, done, getJobGroup, getJobManager, getName, getPriority, getProperty, getResult, getRule, getState, getThread, isBlocking, isSystem, isUser, join, join, removeJobChangeListener, schedule, schedule, setJobGroup, setName, setPriority, setProgressGroup, setProperty, setRule, setSystem, setThread, setUser, shouldRun, shouldSchedule, sleep, toString, wakeUp, wakeUp, yieldRule`

### Methods inherited from class org.eclipse.core.internal.jobs.InternalJob

`compareTo`

### Methods inherited from class org.eclipse.core.runtime.PlatformObject

`getAdapter`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface org.eclipse.core.runtime.IAdaptable

`getAdapter`

### Constructor Detail

#### FileTransferJob

    public FileTransferJob(String name)

Parameters:
  `name` - the name for this file transfer job. Should not be `null`.

### Method Detail

#### setFileTransferRunnable

    public final void setFileTransferRunnable(IFileTransferRunnable fileTransferRunnable)

#### setFileTransfer

    public final void setFileTransfer(IFileTransfer fileTransfer)

Parameters:
  `fileTransfer` - file transfer instance
Since:
  3.0

#### run

    protected final org.eclipse.core.runtime.IStatus run(org.eclipse.core.runtime.IProgressMonitor mntr)

Specified by:
  `run` in class `org.eclipse.core.runtime.jobs.Job`

#### canceling

    protected void canceling()

Overrides:
  `canceling` in class `org.eclipse.core.runtime.jobs.Job`