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

AsynchProxyMixin

public class AsynchProxyMixin extends Object implements AsynchProvider, Externalizable
Comment
author
Bill Burke
version
$Revision: 57186 $

Fields Summary
private static final long
serialVersionUID
public static final String
CURRENT_FUTURE
private transient ThreadLocal
currentFuture
private org.jboss.aop.InstanceAdvisor
advisor
Constructors Summary
Methods Summary
public FuturegetFuture()

      Future future = (Future) currentFuture.get();
      currentFuture.set(null);
      return future;
   
public voidreadExternal(java.io.ObjectInput in)

      advisor = (InstanceAdvisor) in.readObject();
      currentFuture = new ThreadLocal();
      advisor.getMetaData().addMetaData(CURRENT_FUTURE, CURRENT_FUTURE, currentFuture, PayloadKey.TRANSIENT);
   
public voidsetAdvisor(org.jboss.aop.InstanceAdvisor advisor)


      
   
      this.advisor = advisor;
   
public voidsetFuture(Future future)

      try
      {
         Future oldFuture = getFuture();
         if (oldFuture != null) oldFuture.release();
      }
      catch (Exception e)
      {
         // eat it.
      }
      currentFuture.set(future);
   
public voidwriteExternal(java.io.ObjectOutput out)

      out.writeObject(advisor);