com.googlecode.objectify.impl
Class ResultAdapter<T>

java.lang.Object
  extended by com.googlecode.objectify.impl.ResultAdapter<T>
All Implemented Interfaces:
Result<T>

public class ResultAdapter<T>
extends java.lang.Object
implements Result<T>

Adapts a Future object to a (much more convenient) Result object.

Author:
Jeff Schnitzer

Constructor Summary
ResultAdapter(java.util.concurrent.Future<T> fut)
           
 
Method Summary
 T get()
          Waits if necessary for the computation to complete, and then retrieves its result.
 java.util.concurrent.Future<T> getFuture()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultAdapter

public ResultAdapter(java.util.concurrent.Future<T> fut)
Method Detail

get

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

Specified by:
get in interface Result<T>
Returns:
the computed result

getFuture

public java.util.concurrent.Future<T> getFuture()
Specified by:
getFuture in interface Result<T>
Returns:
the underlying Future object


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