FileDocCategorySizeDatePackage
FutureImplJavaUtilConcurrent.javaAPI DocJBoss 4.2.12853Fri Jul 13 21:02:36 BST 2007org.jboss.aspects.asynch

FutureImplJavaUtilConcurrent

public class FutureImplJavaUtilConcurrent extends Object implements RemotableFuture
Comment
author
Bill Burke
version
$Revision: 57186 $

Fields Summary
private Future
result
private org.jboss.util.id.GUID
remoteObjectID
Constructors Summary
public FutureImplJavaUtilConcurrent(Future result)

      this.result = result;
   
Methods Summary
public java.lang.Objectget()

      try
      {
         Object rtn = result.get();
         release();
         return rtn;
      }
      catch (ExecutionException e)
      {
         release();
         throw new InvocationTargetException(e.getCause());
      }
   
public java.lang.Objectget(long milliseconds)

      try
      {
         Object rtn = result.get(milliseconds, TimeUnit.MILLISECONDS);
         release();
         return rtn;
      }
      catch (ExecutionException e)
      {
         release();
         throw new InvocationTargetException(e.getCause());
      }
      catch (java.util.concurrent.TimeoutException e)
      {
         throw new org.jboss.aspects.asynch.TimeoutException(e);
      }
   
public booleanisDone()

      return result.isDone();
   
public voidrelease()

      if (remoteObjectID != null)
      {
         Dispatcher.singleton.unregisterTarget(remoteObjectID);
      }
   
public voidsetRemoteObjectID(org.jboss.util.id.GUID remoteObjectID)

      this.remoteObjectID = remoteObjectID;