RSE
Release 3.2

org.eclipse.rse.core.subsystems
Class SubSystem.SubSystemOperationJob

java.lang.Object
  extended by org.eclipse.core.runtime.PlatformObject
      extended by org.eclipse.core.internal.jobs.InternalJob
          extended by org.eclipse.core.runtime.jobs.Job
              extended by org.eclipse.rse.core.subsystems.SubSystem.SubSystemOperationJob
All Implemented Interfaces:
Comparable, IAdaptable
Direct Known Subclasses:
RemoteCmdSubSystem.CancelShellJob, RemoteCmdSubSystem.RemoveShellJob, RemoteCmdSubSystem.RunCommandJob, RemoteCmdSubSystem.RunShellJob, RemoteCmdSubSystem.SendCommandToShellJob, SubSystem.ConnectJob, SubSystem.DisconnectJob, SubSystem.GetPropertiesJob, SubSystem.GetPropertyJob, SubSystem.ResolveAbsoluteJob, SubSystem.ResolveAbsolutesJob, SubSystem.ResolveRelativeJob, SubSystem.SetPropertiesJob, SubSystem.SetPropertyJob
Enclosing class:
SubSystem

protected abstract class SubSystem.SubSystemOperationJob
extends Job

Represents an operation that can be performed by the subsystem. Since this class extends Job, it is run on a separate thread, but reports progress to the Main thread. Takes care of some common error handling and Status creation for SubSystem Operations.


Nested Class Summary
 class SubSystem.SubSystemOperationJob.ContextRunnable
           
 
Field Summary
protected  boolean _hasStarted
           
protected  Object[] runOutputs
           
protected  String[] runOutputStrings
           
 
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
SubSystem.SubSystemOperationJob(String operationName)
           
 
Method Summary
 Object[] getOutputs()
          SubSystemOperationJobs are designed to be run synchronously - if you require output from them.
 String[] getOutputStrings()
          SubSystemOperationJobs are designed to be run synchronously - if you require output from them.
 boolean hasStarted()
           
abstract  void performOperation(IProgressMonitor monitor)
          Override this method with the actual operation performed by your subsystem operation.
 IStatus run(IProgressMonitor monitor)
           
 IStatus runInContext(IRunnableContext context)
           
 
Methods inherited from class org.eclipse.core.runtime.jobs.Job
addJobChangeListener, belongsTo, cancel, canceling, done, getJobManager, getName, getPriority, getProperty, getResult, getRule, getState, getThread, isBlocking, isSystem, isUser, join, removeJobChangeListener, schedule, schedule, 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
 

Field Detail

runOutputs

protected Object[] runOutputs

runOutputStrings

protected String[] runOutputStrings

_hasStarted

protected boolean _hasStarted
Constructor Detail

SubSystem.SubSystemOperationJob

public SubSystem.SubSystemOperationJob(String operationName)
Method Detail

performOperation

public abstract void performOperation(IProgressMonitor monitor)
                               throws InterruptedException,
                                      InvocationTargetException,
                                      Exception
Override this method with the actual operation performed by your subsystem operation. Make sure to report progress to the Progress monitor.

Throws:
InterruptedException - if the user presses cancel
InvocationTargetException - if there is some error performing the operation
Exception - if there is some other error

getOutputs

public Object[] getOutputs()
SubSystemOperationJobs are designed to be run synchronously - if you require output from them. Clients can query any output using getOutputs() or getOutputStrings().


getOutputStrings

public String[] getOutputStrings()
SubSystemOperationJobs are designed to be run synchronously - if you require output from them. Clients can query any output using getOutputs() or getOutputStrings().


runInContext

public IStatus runInContext(IRunnableContext context)

hasStarted

public boolean hasStarted()

run

public IStatus run(IProgressMonitor monitor)
Specified by:
run in class Job

RSE
Release 3.2

Copyright (c) IBM Corporation and others 2000, 2010. All Rights Reserved.