FileDocCategorySizeDatePackage
FutureImpl.javaAPI DocJBoss 4.2.12629Fri Jul 13 21:02:26 BST 2007org.jboss.aspects.asynch

FutureImpl

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

Fields Summary
private EDU.oswego.cs.dl.util.concurrent.FutureResult
result
private org.jboss.util.id.GUID
remoteObjectID
Constructors Summary
public FutureImpl(EDU.oswego.cs.dl.util.concurrent.FutureResult result)

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

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

      try
      {
         Object rtn = result.timedGet(milliseconds);
         release();
         return rtn;
      }
      catch (EDU.oswego.cs.dl.util.concurrent.TimeoutException e)
      {
         throw new TimeoutException(e);
      }
      catch (InvocationTargetException e)
      {
         release();
         throw e;
      }
   
public booleanisDone()

      return result.isReady();
   
public voidrelease()

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

      this.remoteObjectID = remoteObjectID;