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.internal.jobs.InternalJob>, 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
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
     
    protected final org.eclipse.core.runtime.IStatus
    run(org.eclipse.core.runtime.IProgressMonitor mntr)
     
    final void
     
    final void
     

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

    addJobChangeListener, belongsTo, cancel, create, create, 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
  • Constructor Details

    • FileTransferJob

      public FileTransferJob(String name)
      Parameters:
      name - the name for this file transfer job. Should not be null.
  • Method Details

    • 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