beehive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ken...@apache.org
Subject svn commit: r124176 - in incubator/beehive/trunk/controls: src/runtime/org/apache/beehive/controls/runtime/bean src/spi/org/apache/beehive/controls/spi/svc test/src/controls/org/apache/beehive/controls/test/controls/util
Date Wed, 05 Jan 2005 00:51:51 GMT
Author: kentam
Date: Tue Jan  4 16:51:49 2005
New Revision: 124176

URL: http://svn.apache.org/viewcvs?view=rev&rev=124176
Log:
Modified the Interceptor interface, so methods defined in the interface have ControlBean as

a parameter instead of ControlBeanContext.  This allows interceptors to interact directly
with 
the ControlBean.  


Modified:
   incubator/beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/bean/ControlBean.java
   incubator/beehive/trunk/controls/src/spi/org/apache/beehive/controls/spi/svc/Interceptor.java
   incubator/beehive/trunk/controls/test/src/controls/org/apache/beehive/controls/test/controls/util/TestInterceptorContextImpl.java

Modified: incubator/beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/bean/ControlBean.java
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/bean/ControlBean.java?view=diff&rev=124176&p1=incubator/beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/bean/ControlBean.java&r1=124175&p2=incubator/beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/bean/ControlBean.java&r2=124176
==============================================================================
--- incubator/beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/bean/ControlBean.java
(original)
+++ incubator/beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/bean/ControlBean.java
Tue Jan  4 16:51:49 2005
@@ -360,7 +360,7 @@
             for ( String n : interceptorNames )
             {
                 Interceptor i = ensureInterceptor( n );
-                i.preInvoke( m, args, cbc );
+                i.preInvoke( this, m, args );
             }
         }
 
@@ -391,7 +391,7 @@
                 for ( String n : interceptorNames )
                 {
                     Interceptor i = ensureInterceptor( n );
-                    i.postInvoke( m, args, retval, t, cbc );
+                    i.postInvoke( this, m, args, retval, t );
                 }
             }
 
@@ -862,10 +862,10 @@
      */
     static private class NullInterceptor implements Interceptor
     {
-        public boolean preInvoke( Method m, Object [] args, org.apache.beehive.controls.api.context.ControlBeanContext
cbc ) { return true; }
-        public boolean postInvoke( Method m, Object [] args, Object retval, Throwable t,
org.apache.beehive.controls.api.context.ControlBeanContext cbc ) { return true; }
-        public boolean preEvent( Class eventSet, Method m, Object [] args, org.apache.beehive.controls.api.context.ControlBeanContext
cbc ) { return true; }
-        public boolean postEvent( Class eventSet, Method m, Object [] args, org.apache.beehive.controls.api.context.ControlBeanContext
cbc ) { return true; }
+        public boolean preInvoke( org.apache.beehive.controls.api.bean.ControlBean cb, Method
m, Object [] args ) { return true; }
+        public boolean postInvoke( org.apache.beehive.controls.api.bean.ControlBean cb, Method
m, Object [] args, Object retval, Throwable t) { return true; }
+        public boolean preEvent( org.apache.beehive.controls.api.bean.ControlBean cb, Class
eventSet, Method m, Object [] args) { return true; }
+        public boolean postEvent( org.apache.beehive.controls.api.bean.ControlBean cb, Class
eventSet, Method m, Object [] args ) { return true; }
     }
 
     /** BEGIN unsynchronized fields */

Modified: incubator/beehive/trunk/controls/src/spi/org/apache/beehive/controls/spi/svc/Interceptor.java
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/controls/src/spi/org/apache/beehive/controls/spi/svc/Interceptor.java?view=diff&rev=124176&p1=incubator/beehive/trunk/controls/src/spi/org/apache/beehive/controls/spi/svc/Interceptor.java&r1=124175&p2=incubator/beehive/trunk/controls/src/spi/org/apache/beehive/controls/spi/svc/Interceptor.java&r2=124176
==============================================================================
--- incubator/beehive/trunk/controls/src/spi/org/apache/beehive/controls/spi/svc/Interceptor.java
(original)
+++ incubator/beehive/trunk/controls/src/spi/org/apache/beehive/controls/spi/svc/Interceptor.java
Tue Jan  4 16:51:49 2005
@@ -17,7 +17,7 @@
  * $Header:$
  */
 
-import org.apache.beehive.controls.api.context.ControlBeanContext;
+import org.apache.beehive.controls.api.bean.ControlBean;
 
 import java.lang.reflect.Method;
 
@@ -41,12 +41,12 @@
 public interface Interceptor
 {
     /** Called before a control operation is invoked */
-    public boolean preInvoke( Method m, Object [] args, ControlBeanContext cbc );
+    public boolean preInvoke( ControlBean cb, Method m, Object [] args);
     /** Called after a control operation is invoked */
-    public boolean postInvoke( Method m, Object [] args, Object retval, Throwable t, ControlBeanContext
cbc );
+    public boolean postInvoke( ControlBean cb, Method m, Object [] args, Object retval, Throwable
t );
 
     /** Called before a control event is fired (through a client proxy) */
-    public boolean preEvent( Class eventSet, Method m, Object [] args, ControlBeanContext
cbc );
+    public boolean preEvent( ControlBean cb, Class eventSet, Method m, Object [] args );
     /** Called after a control event is fired (through a client proxy) */
-    public boolean postEvent( Class eventSet, Method m, Object [] args, ControlBeanContext
cbc );
+    public boolean postEvent( ControlBean cb, Class eventSet, Method m, Object [] args);
 }

Modified: incubator/beehive/trunk/controls/test/src/controls/org/apache/beehive/controls/test/controls/util/TestInterceptorContextImpl.java
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/controls/test/src/controls/org/apache/beehive/controls/test/controls/util/TestInterceptorContextImpl.java?view=diff&rev=124176&p1=incubator/beehive/trunk/controls/test/src/controls/org/apache/beehive/controls/test/controls/util/TestInterceptorContextImpl.java&r1=124175&p2=incubator/beehive/trunk/controls/test/src/controls/org/apache/beehive/controls/test/controls/util/TestInterceptorContextImpl.java&r2=124176
==============================================================================
--- incubator/beehive/trunk/controls/test/src/controls/org/apache/beehive/controls/test/controls/util/TestInterceptorContextImpl.java
(original)
+++ incubator/beehive/trunk/controls/test/src/controls/org/apache/beehive/controls/test/controls/util/TestInterceptorContextImpl.java
Tue Jan  4 16:51:49 2005
@@ -1,6 +1,6 @@
 package org.apache.beehive.controls.test.controls.util;
 
-import org.apache.beehive.controls.api.context.ControlBeanContext;
+import org.apache.beehive.controls.api.bean.ControlBean;
 
 import java.lang.reflect.Method;
 import java.beans.beancontext.BeanContextServiceProvider;
@@ -59,7 +59,7 @@
     static public TestInterceptorContextImpl.TestInterceptorContextProvider getProvider()
{ return _theProvider; }
 
 
-    public boolean preInvoke( Method m, Object [] args, ControlBeanContext cbc )
+    public boolean preInvoke( ControlBean cb, Method m, Object [] args)
     {
         System.out.println( "***********************" );
         System.out.println( "***********************" );
@@ -70,11 +70,11 @@
         return true;
     }
 
-    public boolean postInvoke( Method m, Object [] args, Object retval, Throwable t, ControlBeanContext
cbc ) { return true; }
+    public boolean postInvoke( ControlBean cb, Method m, Object [] args, Object retval, Throwable
t) { return true; }
 
     /** Called before a control event is fired (through a client proxy) */
-    public boolean preEvent( Class eventSet, Method m, Object [] args, ControlBeanContext
cbc ) { return true; }
+    public boolean preEvent( ControlBean cb, Class eventSet, Method m, Object [] args) {
return true; }
     /** Called after a control event is fired (through a client proxy) */
-    public boolean postEvent( Class eventSet, Method m, Object [] args, ControlBeanContext
cbc ) { return true; }
+    public boolean postEvent( ControlBean cb, Class eventSet, Method m, Object [] args) {
return true; }
 }
 

Mime
View raw message