[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jboss-cvs-commits
Subject:    [jboss-cvs] jbosstest/src/main/org/jboss/test/aop/bean AOPTester.java AfterInterceptor.java BeforeIn
From:       Bill Burke <patriot1burke () users ! sourceforge ! net>
Date:       2004-01-30 16:51:01
Message-ID: E1AmbrB-0007Wu-Ub () sc8-pr-cvs1 ! sourceforge ! net
[Download RAW message or body]

  User: patriot1burke
  Date: 04/01/30 08:51:01

  Modified:    src/main/org/jboss/test/aop/bean AOPTester.java
                        AfterInterceptor.java BeforeInterceptor.java
                        CallerInterceptor.java SimpleBeanInterceptor.java
                        SimpleBeanInterceptorFactory.java
                        SimpleInterceptor.java
                        SimpleInterceptorFactory.java
  Log:
  repacking and renaming of AOP clases
  
  Revision  Changes    Path
  1.24      +5 -5      jbosstest/src/main/org/jboss/test/aop/bean/AOPTester.java
  
  Index: AOPTester.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/aop/bean/AOPTester.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- AOPTester.java	30 Aug 2003 00:29:20 -0000	1.23
  +++ AOPTester.java	30 Jan 2004 16:51:01 -0000	1.24
  @@ -8,7 +8,7 @@
   
   import org.jboss.aop.Advised;
   import org.jboss.aop.InstanceAdvisor;
  -import org.jboss.aop.ThreadMetaData;
  +import org.jboss.aop.metadata.ThreadMetaData;
   import org.jboss.logging.Logger;
   import org.jboss.system.ServiceMBeanSupport;
   
  @@ -19,7 +19,7 @@
    *
    * @see Monitorable
    * @author <a href="mailto:bill@jboss.org">Bill Burke</a>
  - * @version $Revision: 1.23 $
  + * @version $Revision: 1.24 $
    */
   public class AOPTester
      extends ServiceMBeanSupport
  @@ -167,13 +167,13 @@
   
            SimpleInterceptor.lastIntercepted = null;
            SimpleInterceptor.lastTransAttributeAccessed = null;
  -         ThreadMetaData.instance().addMetaData("transaction", "trans-attribute", \
"Never");  +         \
org.jboss.aop.metadata.ThreadMetaData.instance().addMetaData("transaction", \
"trans-attribute", "Never");  pojo.someMethod3();
            if (!"someMethod3".equals(SimpleInterceptor.lastIntercepted))  
               throw new RuntimeException("Failed on interception test");
            if (!"Never".equals(SimpleInterceptor.lastTransAttributeAccessed))  
               throw new RuntimeException("Failed on metadata test");
  -         ThreadMetaData.instance().clear();
  +         org.jboss.aop.metadata.ThreadMetaData.instance().clear();
   
            SimpleInterceptor.lastIntercepted = null;
            SimpleInterceptor.lastTransAttributeAccessed = null;
  @@ -184,7 +184,7 @@
               throw new RuntimeException("Failed on interception test");
            if (!"NotSupported".equals(SimpleInterceptor.lastTransAttributeAccessed)) \
  throw new RuntimeException("Failed on metadata test");
  -         ThreadMetaData.instance().clear();
  +         org.jboss.aop.metadata.ThreadMetaData.instance().clear();
   
         }
         catch (Throwable ex)
  
  
  
  1.8       +7 -7      \
jbosstest/src/main/org/jboss/test/aop/bean/AfterInterceptor.java  
  Index: AfterInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/aop/bean/AfterInterceptor.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- AfterInterceptor.java	30 Aug 2003 00:29:20 -0000	1.7
  +++ AfterInterceptor.java	30 Jan 2004 16:51:01 -0000	1.8
  @@ -6,17 +6,17 @@
    */
   package org.jboss.test.aop.bean;
   
  -import org.jboss.aop.Interceptor;
  -import org.jboss.aop.Invocation;
  -import org.jboss.aop.MethodInvocation;
  +import org.jboss.aop.advice.Interceptor;
  +import org.jboss.aop.joinpoint.Invocation;
  +import org.jboss.aop.joinpoint.MethodInvocation;
   
   import java.lang.reflect.Method;
   /**
    *
    * @author <a href="mailto:bill@jboss.org">Bill Burke</a>
  - * @version $Revision: 1.7 $
  + * @version $Revision: 1.8 $
    */
  -public class AfterInterceptor implements Interceptor
  +public class AfterInterceptor implements org.jboss.aop.advice.Interceptor
   {
   
      public String getName()
  @@ -24,10 +24,10 @@
         return "AfterInterceptor";
      }
   
  -   public Object invoke(Invocation invocation) throws Throwable
  +   public Object invoke(org.jboss.aop.joinpoint.Invocation invocation) throws \
Throwable  {
         System.out.println("AfterInterceptor interception: " + \
                invocation.getType());
  -      MethodInvocation methodInvocation = (MethodInvocation)invocation;
  +      org.jboss.aop.joinpoint.MethodInvocation methodInvocation = \
(org.jboss.aop.joinpoint.MethodInvocation)invocation;  Method m = \
methodInvocation.method;  lastIntercepted = m.getName();
         String transattr = (String)invocation.getMetaData("transaction", \
"trans-attribute");  
  
  
  1.8       +7 -7      \
jbosstest/src/main/org/jboss/test/aop/bean/BeforeInterceptor.java  
  Index: BeforeInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/aop/bean/BeforeInterceptor.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- BeforeInterceptor.java	30 Aug 2003 00:29:20 -0000	1.7
  +++ BeforeInterceptor.java	30 Jan 2004 16:51:01 -0000	1.8
  @@ -6,17 +6,17 @@
    */
   package org.jboss.test.aop.bean;
   
  -import org.jboss.aop.Interceptor;
  -import org.jboss.aop.Invocation;
  -import org.jboss.aop.MethodInvocation;
  +import org.jboss.aop.advice.Interceptor;
  +import org.jboss.aop.joinpoint.Invocation;
  +import org.jboss.aop.joinpoint.MethodInvocation;
   
   import java.lang.reflect.Method;
   /**
    *
    * @author <a href="mailto:bill@jboss.org">Bill Burke</a>
  - * @version $Revision: 1.7 $
  + * @version $Revision: 1.8 $
    */
  -public class BeforeInterceptor implements Interceptor
  +public class BeforeInterceptor implements org.jboss.aop.advice.Interceptor
   {
   
      public String getName()
  @@ -24,10 +24,10 @@
         return "BeforeInterceptor";
      }
   
  -   public Object invoke(Invocation invocation) throws Throwable
  +   public Object invoke(org.jboss.aop.joinpoint.Invocation invocation) throws \
Throwable  {
         System.out.println("BeforeInterceptor interception: " + \
                invocation.getType());
  -      MethodInvocation methodInvocation = (MethodInvocation)invocation;
  +      org.jboss.aop.joinpoint.MethodInvocation methodInvocation = \
(org.jboss.aop.joinpoint.MethodInvocation)invocation;  Method m = \
methodInvocation.method;  lastIntercepted = m.getName();
         String transattr = (String)invocation.getMetaData("transaction", \
"trans-attribute");  
  
  
  1.5       +6 -6      \
jbosstest/src/main/org/jboss/test/aop/bean/CallerInterceptor.java  
  Index: CallerInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/aop/bean/CallerInterceptor.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- CallerInterceptor.java	30 Aug 2003 00:29:20 -0000	1.4
  +++ CallerInterceptor.java	30 Jan 2004 16:51:01 -0000	1.5
  @@ -6,15 +6,15 @@
    */
   package org.jboss.test.aop.bean;
   
  -import org.jboss.aop.CallerInvocation;
  -import org.jboss.aop.Interceptor;
  -import org.jboss.aop.Invocation;
  +import org.jboss.aop.joinpoint.CallerInvocation;
  +import org.jboss.aop.advice.Interceptor;
  +import org.jboss.aop.joinpoint.Invocation;
   import org.jboss.logging.Logger;
   
   /**
    * @author ifedorenko
    */
  -public class CallerInterceptor implements Interceptor
  +public class CallerInterceptor implements org.jboss.aop.advice.Interceptor
   {
   
      static Logger log = Logger.getLogger(CallerInterceptor.class);
  @@ -24,10 +24,10 @@
         return "CallerInterceptor";
      }
      public static boolean called = false;
  -   public Object invoke(Invocation invocation) throws Throwable
  +   public Object invoke(org.jboss.aop.joinpoint.Invocation invocation) throws \
Throwable  {
         log.info("in CallerInterceptor");
  -      CallerInvocation methodInvocation = (CallerInvocation)invocation;
  +      org.jboss.aop.joinpoint.CallerInvocation methodInvocation = \
(org.jboss.aop.joinpoint.CallerInvocation)invocation;  called = true;
         return invocation.invokeNext();
      }
  
  
  
  1.8       +6 -6      \
jbosstest/src/main/org/jboss/test/aop/bean/SimpleBeanInterceptor.java  
  Index: SimpleBeanInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/aop/bean/SimpleBeanInterceptor.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SimpleBeanInterceptor.java	30 Aug 2003 00:29:20 -0000	1.7
  +++ SimpleBeanInterceptor.java	30 Jan 2004 16:51:01 -0000	1.8
  @@ -6,9 +6,9 @@
    */
   package org.jboss.test.aop.bean;
   
  -import org.jboss.aop.Interceptor;
  -import org.jboss.aop.Invocation;
  -import org.jboss.aop.MethodInvocation;
  +import org.jboss.aop.advice.Interceptor;
  +import org.jboss.aop.joinpoint.Invocation;
  +import org.jboss.aop.joinpoint.MethodInvocation;
   import org.jboss.logging.Logger;
   
   import java.lang.reflect.Method;
  @@ -16,7 +16,7 @@
   /**
    * @author ifedorenko
    */
  -public class SimpleBeanInterceptor implements Interceptor
  +public class SimpleBeanInterceptor implements org.jboss.aop.advice.Interceptor
   {
   
      static Logger log = Logger.getLogger(SimpleBeanInterceptor.class);
  @@ -26,10 +26,10 @@
         return "SimpleInterceptor";
      }
   
  -   public Object invoke(Invocation invocation) throws Throwable
  +   public Object invoke(org.jboss.aop.joinpoint.Invocation invocation) throws \
Throwable  {
         log.info("in SimpleBeanInterceptor");
  -      MethodInvocation methodInvocation = (MethodInvocation)invocation;
  +      org.jboss.aop.joinpoint.MethodInvocation methodInvocation = \
(org.jboss.aop.joinpoint.MethodInvocation)invocation;  final Method m = \
methodInvocation.method;  if ("getTest".equals(m.getName()) 
               && "org.jboss.test.aop.simpleejb.SimpleBean".equals(m.getDeclaringClass().getName()) \
)  
  
  
  1.4       +4 -4      \
jbosstest/src/main/org/jboss/test/aop/bean/SimpleBeanInterceptorFactory.java  
  Index: SimpleBeanInterceptorFactory.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/aop/bean/SimpleBeanInterceptorFactory.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SimpleBeanInterceptorFactory.java	30 Aug 2003 00:29:21 -0000	1.3
  +++ SimpleBeanInterceptorFactory.java	30 Jan 2004 16:51:01 -0000	1.4
  @@ -7,16 +7,16 @@
   package org.jboss.test.aop.bean;
   
   import org.jboss.aop.Advisor;
  -import org.jboss.aop.Interceptor;
  -import org.jboss.aop.InterceptorFactory;
  +import org.jboss.aop.advice.Interceptor;
  +import org.jboss.aop.advice.InterceptorFactory;
   
   /**
    * @author ifedorenko
    */
  -public class SimpleBeanInterceptorFactory implements InterceptorFactory
  +public class SimpleBeanInterceptorFactory implements \
org.jboss.aop.advice.InterceptorFactory  {
   
  -   public Interceptor create(Advisor advisor)
  +   public org.jboss.aop.advice.Interceptor create(Advisor advisor)
      {
         return new SimpleBeanInterceptor();
      }
  
  
  
  1.14      +12 -12    \
jbosstest/src/main/org/jboss/test/aop/bean/SimpleInterceptor.java  
  Index: SimpleInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/aop/bean/SimpleInterceptor.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- SimpleInterceptor.java	30 Aug 2003 00:29:21 -0000	1.13
  +++ SimpleInterceptor.java	30 Jan 2004 16:51:01 -0000	1.14
  @@ -6,20 +6,20 @@
    */
   package org.jboss.test.aop.bean;
   
  -import org.jboss.aop.FieldInvocation;
  -import org.jboss.aop.Interceptor;
  -import org.jboss.aop.Invocation;
  -import org.jboss.aop.InvocationType;
  -import org.jboss.aop.MethodInvocation;
  +import org.jboss.aop.joinpoint.FieldInvocation;
  +import org.jboss.aop.advice.Interceptor;
  +import org.jboss.aop.joinpoint.Invocation;
  +import org.jboss.aop.joinpoint.InvocationType;
  +import org.jboss.aop.joinpoint.MethodInvocation;
   
   import java.lang.reflect.Field;
   import java.lang.reflect.Method;
   /**
    *
    * @author <a href="mailto:bill@jboss.org">Bill Burke</a>
  - * @version $Revision: 1.13 $
  + * @version $Revision: 1.14 $
    */
  -public class SimpleInterceptor implements Interceptor
  +public class SimpleInterceptor implements org.jboss.aop.advice.Interceptor
   {
   
      public String getName()
  @@ -27,12 +27,12 @@
         return "SimpleInterceptor";
      }
   
  -   public Object invoke(Invocation invocation) throws Throwable
  +   public Object invoke(org.jboss.aop.joinpoint.Invocation invocation) throws \
Throwable  {
         System.out.println("interception: " + invocation.getType());
  -      if (invocation.getType() == InvocationType.METHOD)
  +      if (invocation.getType() == org.jboss.aop.joinpoint.InvocationType.METHOD)
         {
  -         MethodInvocation methodInvocation = (MethodInvocation)invocation;
  +         org.jboss.aop.joinpoint.MethodInvocation methodInvocation = \
(org.jboss.aop.joinpoint.MethodInvocation)invocation;  Method m = \
methodInvocation.method;  if (m.getName().equals("whazup")) return "nada";
            lastIntercepted = m.getName();
  @@ -40,9 +40,9 @@
            System.out.println("trans-attribute: " + transattr);
            lastTransAttributeAccessed = transattr;
         }
  -      else if (invocation.getType() == InvocationType.FIELD_READ || \
invocation.getType() == InvocationType.FIELD_WRITE)  +      else if \
(invocation.getType() == org.jboss.aop.joinpoint.InvocationType.FIELD_READ || \
invocation.getType() == org.jboss.aop.joinpoint.InvocationType.FIELD_WRITE)  {
  -         FieldInvocation fieldInvocation = (FieldInvocation)invocation;
  +         org.jboss.aop.joinpoint.FieldInvocation fieldInvocation = \
(org.jboss.aop.joinpoint.FieldInvocation)invocation;  Field field = \
fieldInvocation.field;  lastFieldIntercepted = field.getName();
            String transattr = (String)invocation.getMetaData("transaction", \
"trans-attribute");  
  
  
  1.6       +5 -5      \
jbosstest/src/main/org/jboss/test/aop/bean/SimpleInterceptorFactory.java  
  Index: SimpleInterceptorFactory.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/aop/bean/SimpleInterceptorFactory.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- SimpleInterceptorFactory.java	30 Aug 2003 00:29:21 -0000	1.5
  +++ SimpleInterceptorFactory.java	30 Jan 2004 16:51:01 -0000	1.6
  @@ -7,18 +7,18 @@
   package org.jboss.test.aop.bean;
   
   import org.jboss.aop.Advisor;
  -import org.jboss.aop.Interceptor;
  -import org.jboss.aop.InterceptorFactory;
  +import org.jboss.aop.advice.Interceptor;
  +import org.jboss.aop.advice.InterceptorFactory;
   
   /**
    *
    * @author <a href="mailto:bill@jboss.org">Bill Burke</a>
  - * @version $Revision: 1.5 $
  + * @version $Revision: 1.6 $
    */
  -public class SimpleInterceptorFactory implements InterceptorFactory
  +public class SimpleInterceptorFactory implements \
org.jboss.aop.advice.InterceptorFactory  {
   
  -   public Interceptor create(Advisor advisor)
  +   public org.jboss.aop.advice.Interceptor create(Advisor advisor)
      {
         return new SimpleInterceptor();
      }
  
  
  


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
jboss-cvs-commits mailing list
jboss-cvs-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-cvs-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic