FileDocCategorySizeDatePackage
StateChangeInterceptor.javaAPI DocJBoss 4.2.12116Fri Jul 13 21:02:32 BST 2007org.jboss.aspects.versioned

StateChangeInterceptor

public class StateChangeInterceptor extends Object implements org.jboss.aop.advice.Interceptor
author
Bill Burke
version
$Revision: 57186 $

Fields Summary
protected DistributedPOJOState
manager
Constructors Summary
public StateChangeInterceptor(DistributedPOJOState manager)

      this.manager = manager;
   
Methods Summary
public java.lang.StringgetName()

 return "StateChangeInterceptor"; 
public java.lang.Objectinvoke(org.jboss.aop.joinpoint.Invocation invocation)

      if (!(invocation instanceof FieldWriteInvocation) && !(invocation instanceof FieldReadInvocation)) return invocation.invokeNext();

      // Don't need to worry if we're static or not because this is an instance interceptor

      if (invocation instanceof FieldReadInvocation)
      {
         return manager.fieldRead(invocation);
      }
      else
      {
         return manager.fieldWrite(invocation);
      }