Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


org.eclipse.emf.transaction
Class RunnableWithResult.Impl<T>

java.lang.Object
  extended by 
org.eclipse.emf.transaction.RunnableWithResult.Impl<T>
All Implemented Interfaces:
Runnable, RunnableWithResult<T>
Direct Known Subclasses:
PrivilegedRunnable
Enclosing interface:
RunnableWithResult< T>

public abstract static class RunnableWithResult.Impl<T>
extends Object
implements RunnableWithResult<T>

A convenient partial implementation of the RunnableWithResult interface that implements a settable result field and commit status.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.emf.transaction. RunnableWithResult
RunnableWithResult.Impl< T>
 
Constructor Summary
RunnableWithResult.Impl ()
           
 
Method Summary
  T getResult ()
          Returns a result computed by my Runnable.run() method.
  IStatus getStatus ()
          Queries my commit status.
protected  void setResult ( T result)
          Sets my result.
 void setStatus ( IStatus status)
          Sets the commit status after completion of the Runnable.run() method.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.lang. Runnable
run
 

Constructor Detail

RunnableWithResult.Impl

public RunnableWithResult.Impl()
Method Detail

setResult

protected final void setResult(
T result)
Sets my result.

Parameters:
result - my result

getStatus

public final 
IStatus getStatus()
Description copied from interface: RunnableWithResult
Queries my commit status. My status is only available after I have finished running and after the editing domain has attempted to commit my transaction.

Specified by:
getStatus in interface RunnableWithResult< T>
Returns:
the status of my commit (as set by the RunnableWithResult.setStatus(IStatus) method)

getResult

public final 
T getResult()
Description copied from interface: RunnableWithResult
Returns a result computed by my Runnable.run() method.

Specified by:
getResult in interface RunnableWithResult< T>
Returns:
my result, or null if none

setStatus

public final void setStatus(
IStatus status)
Description copied from interface: RunnableWithResult
Sets the commit status after completion of the Runnable.run() method.

Specified by:
setStatus in interface RunnableWithResult< T>
Parameters:
status - an OK status if commit succeeds, or an error status if it fails (in which case the transaction rolled back and the status provides details in human-readable form)

Copyright 2002, 2007 IBM Corporation and others.
All Rights Reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire