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);
Constructor and Description |
---|
FileTransferJob(String name) |
Modifier and Type | Method and Description |
---|---|
protected void |
canceling() |
protected org.eclipse.core.runtime.IStatus |
run(org.eclipse.core.runtime.IProgressMonitor mntr) |
void |
setFileTransfer(IFileTransfer fileTransfer) |
void |
setFileTransferRunnable(IFileTransferRunnable fileTransferRunnable) |
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
public FileTransferJob(String name)
name
- the name for this file transfer job. Should not be null
.public final void setFileTransferRunnable(IFileTransferRunnable fileTransferRunnable)
public final void setFileTransfer(IFileTransfer fileTransfer)
fileTransfer
- file transfer instanceprotected final org.eclipse.core.runtime.IStatus run(org.eclipse.core.runtime.IProgressMonitor mntr)
run
in class org.eclipse.core.runtime.jobs.Job
protected void canceling()
canceling
in class org.eclipse.core.runtime.jobs.Job
Copyright © 2017. All rights reserved.