commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject cvs commit: jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/service/impl AbstractLoggingInterceptor.java LoggingInterceptorFactory.java
Date Thu, 11 Sep 2003 20:51:52 GMT
hlship      2003/09/11 13:51:52

  Modified:    hivemind/src/java/org/apache/commons/hivemind/impl
                        InterceptorStackImpl.java
               hivemind/src/java/org/apache/commons/hivemind
                        InterceptorStack.java
               hivemind/src/test/hivemind/test/services/impl
                        TrackerFactory.java
               hivemind/src/java/org/apache/commons/hivemind/service/impl
                        AbstractLoggingInterceptor.java
                        LoggingInterceptorFactory.java
  Log:
  Simplifiy InterceptorStack interface and cleanup some imports.
  
  Revision  Changes    Path
  1.9       +1 -6      jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/impl/InterceptorStackImpl.java
  
  Index: InterceptorStackImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/impl/InterceptorStackImpl.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- InterceptorStackImpl.java	11 Sep 2003 14:24:30 -0000	1.8
  +++ InterceptorStackImpl.java	11 Sep 2003 20:51:52 -0000	1.9
  @@ -109,11 +109,6 @@
           return _sep;
       }
   
  -    public ClassResolver getClassResolver()
  -    {
  -        return _sep.getModule().getClassResolver();
  -    }
  -
       public Class getServiceInterface()
       {
           return _interfaceClass;
  
  
  
  1.6       +1 -10     jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/InterceptorStack.java
  
  Index: InterceptorStack.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/InterceptorStack.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- InterceptorStack.java	11 Sep 2003 14:24:30 -0000	1.5
  +++ InterceptorStack.java	11 Sep 2003 20:51:52 -0000	1.6
  @@ -93,13 +93,4 @@
   	 */
   	
   	public void push(Object interceptor);
  -	
  -	/**
  -	 * Returns the class resolver of the module which
  -	 * defines the extension point.
  -	 * @see ClassResolver#getClassLoader()
  -	 * @see java.lang.reflect.Proxy#newProxyInstance(java.lang.ClassLoader, java.lang.Class[],
java.lang.reflect.InvocationHandler)
  -	 */
  -
  -	public ClassResolver getClassResolver();
   }
  
  
  
  1.9       +2 -2      jakarta-commons-sandbox/hivemind/src/test/hivemind/test/services/impl/TrackerFactory.java
  
  Index: TrackerFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/hivemind/src/test/hivemind/test/services/impl/TrackerFactory.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TrackerFactory.java	5 Sep 2003 22:32:38 -0000	1.8
  +++ TrackerFactory.java	11 Sep 2003 20:51:52 -0000	1.9
  @@ -113,7 +113,7 @@
           List parameters)
       {
           Class interfaceClass = stack.getServiceInterface();
  -        ClassLoader loader = stack.getClassResolver().getClassLoader();
  +        ClassLoader loader = contributingModule.getClassResolver().getClassLoader();
   
           Object top = stack.peek();
   
  
  
  
  1.5       +2 -2      jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/service/impl/AbstractLoggingInterceptor.java
  
  Index: AbstractLoggingInterceptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/service/impl/AbstractLoggingInterceptor.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AbstractLoggingInterceptor.java	30 Aug 2003 14:29:53 -0000	1.4
  +++ AbstractLoggingInterceptor.java	11 Sep 2003 20:51:52 -0000	1.5
  @@ -57,7 +57,7 @@
   
   package org.apache.commons.hivemind.service.impl;
   
  -import org.apache.commons.hivemind.service.*;
  +import org.apache.commons.hivemind.service.ClassFabUtils;
   import org.apache.commons.logging.Log;
   
   /**
  
  
  
  1.11      +18 -21    jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/service/impl/LoggingInterceptorFactory.java
  
  Index: LoggingInterceptorFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/service/impl/LoggingInterceptorFactory.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- LoggingInterceptorFactory.java	11 Sep 2003 14:24:30 -0000	1.10
  +++ LoggingInterceptorFactory.java	11 Sep 2003 20:51:52 -0000	1.11
  @@ -61,8 +61,9 @@
   import java.lang.reflect.Modifier;
   
   import org.apache.commons.hivemind.InterceptorStack;
  -import org.apache.commons.hivemind.service.*;
  +import org.apache.commons.hivemind.service.BodyBuilder;
   import org.apache.commons.hivemind.service.ClassFab;
  +import org.apache.commons.hivemind.service.ClassFabUtils;
   import org.apache.commons.hivemind.service.MethodFab;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  @@ -87,8 +88,8 @@
   {
       protected void createInfrastructure(InterceptorStack stack, ClassFab classFab)
       {
  -    	Class topClass = stack.peek().getClass();
  -    	
  +        Class topClass = stack.peek().getClass();
  +
           classFab.addField("_inner", topClass);
   
           classFab.addConstructor(
  @@ -97,22 +98,19 @@
               "{ super($1); _inner = $2; }");
       }
   
  -	protected Object instantiateInterceptor(
  -		InterceptorStack stack,
  -		Class interceptorClass)
  -		throws Exception
  -	{
  -		Object stackTop = stack.peek();
  -		Class topClass = stackTop.getClass();
  -    	
  -		Log log = LogFactory.getLog(stack.getServiceExtensionPoint().getExtensionPointId());
  -
  -		Constructor c =
  -			interceptorClass.getConstructor(new Class[] { Log.class, topClass });
  -
  -		return c.newInstance(new Object[] { log, stackTop });
  -	}
  -	
  +    protected Object instantiateInterceptor(InterceptorStack stack, Class interceptorClass)
  +        throws Exception
  +    {
  +        Object stackTop = stack.peek();
  +        Class topClass = stackTop.getClass();
  +
  +        Log log = LogFactory.getLog(stack.getServiceExtensionPoint().getExtensionPointId());
  +
  +        Constructor c = interceptorClass.getConstructor(new Class[] { Log.class, topClass
});
  +
  +        return c.newInstance(new Object[] { log, stackTop });
  +    }
  +
       protected void addServiceMethodImplementation(
           ClassFab classFab,
           String methodName,
  @@ -197,6 +195,5 @@
       {
           return AbstractLoggingInterceptor.class;
       }
  -
   
   }
  
  
  

Mime
View raw message