Dali Provisional API
Release 3.2

org.eclipse.jpt.common.core.utility.command
Class InterruptibleJobCommand.Interrupted

java.lang.Object
  extended by org.eclipse.jpt.common.core.utility.command.InterruptibleJobCommand.Interrupted
All Implemented Interfaces:
Serializable, InterruptibleJobCommand
Enclosing interface:
InterruptibleJobCommand

public static final class InterruptibleJobCommand.Interrupted
extends Object
implements InterruptibleJobCommand, Serializable

Singleton implementation of the interruptible job command interface that will throw an interrupted exception when executed.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.common.core.utility.command.InterruptibleJobCommand
InterruptibleJobCommand.Interrupted
 
Field Summary
static InterruptibleJobCommand INSTANCE
           
 
Method Summary
 IStatus execute(IProgressMonitor monitor)
          Execute the command.
static InterruptibleJobCommand instance()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INSTANCE

public static final InterruptibleJobCommand INSTANCE
Method Detail

instance

public static InterruptibleJobCommand instance()

execute

public IStatus execute(IProgressMonitor monitor)
                throws InterruptedException
Description copied from interface: InterruptibleJobCommand
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
Throws:
InterruptedException
See Also:
IProgressMonitor.isCanceled(), Job.run(IProgressMonitor monitor)

toString

public String toString()
Overrides:
toString in class Object

Dali Provisional API
Release 3.2

Copyright (c) 2012 Oracle. All rights reserved.