com.googlecode.objectify
Interface Result<T>

All Known Implementing Classes:
ResultAdapter

public interface Result<T>

This interface provides a return value for asynchronous Objectify calls, nearly the same as java.util.concurrent.Future. Unfortunately the methods of Future throw checked exceptions, rendering the class prohibitively painful to use in business logic. This interface fixes that problem, and implementors automatically unwrap ExecutionExceptions (checked exceptions will be wrapped in a new RuntimeException).

Author:
Jeff Schnitzer

Method Summary
 T get()
          Waits if necessary for the computation to complete, and then retrieves its result.
 java.util.concurrent.Future<T> getFuture()
           
 

Method Detail

get

T get()
Waits if necessary for the computation to complete, and then retrieves its result. If the computation produced an exception, it will be thrown here.

Returns:
the computed result

getFuture

java.util.concurrent.Future<T> getFuture()
Returns:
the underlying Future object


Copyright © 2011 Jeff Schnitzer and a gang of pirates. All Rights Reserved. Build version: 3.1