Dali Provisional API
Release 3.2

org.eclipse.jpt.common.core.utility.command
Interface JobCommand

All Superinterfaces:
InterruptibleJobCommand
All Known Subinterfaces:
NotifyingRepeatingJobCommand, RepeatingJobCommand
All Known Implementing Classes:
JobCommand.Disabled, JobCommand.Null, NotifyingRepeatingJobCommand.Null, RepeatingJobCommand.Null

public interface JobCommand
extends InterruptibleJobCommand

Simple interface for implementing the GOF Command design pattern in an Eclipse job.

Provisional API: This interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.


Nested Class Summary
static class JobCommand.Disabled
          Singleton implementation of the job command interface that will throw an exception when executed.
static class JobCommand.Null
          Singleton implementation of the job command interface that will do nothing when executed.
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.common.core.utility.command.InterruptibleJobCommand
InterruptibleJobCommand.Interrupted
 
Method Summary
 IStatus execute(IProgressMonitor monitor)
          Execute the command.
 

Method Detail

execute

IStatus execute(IProgressMonitor monitor)
Execute the command. The semantics of the command is determined by the contract between the client and server. The command should check, as appropriate, whether the specified progress monitor is "canceled"; if it is, the command should return a result status of severity IStatus.CANCEL. The singleton cancel status Status.CANCEL_STATUS can be used for this purpose.

Nested methods can also check the progress monitor and, if it is "canceled", throw an OperationCanceledException.

Specified by:
execute in interface InterruptibleJobCommand
See Also:
IProgressMonitor.isCanceled(), Job.run(IProgressMonitor monitor)

Dali Provisional API
Release 3.2

Copyright (c) 2012 Oracle. All rights reserved.