- Revision
- 268
- Author
- mauro
- Date
- 2007-07-17 12:19:01 -0500 (Tue, 17 Jul 2007)
Log Message
Renamed Monitor interface to ActionMonitor.
Modified Paths
- trunk/core/src/main/java/org/codehaus/waffle/ComponentRegistry.java
- trunk/core/src/main/java/org/codehaus/waffle/action/AbstractMethodDefinitionFinder.java
- trunk/core/src/main/java/org/codehaus/waffle/action/AnnotatedMethodDefinitionFinder.java
- trunk/core/src/main/java/org/codehaus/waffle/action/ParanamerMethodDefinitionFinder.java
- trunk/core/src/main/java/org/codehaus/waffle/action/RequestParameterMethodNameResolver.java
- trunk/core/src/main/java/org/codehaus/waffle/context/pico/PicoComponentRegistry.java
- trunk/core/src/main/java/org/codehaus/waffle/monitor/AbstractWritingMonitor.java
- trunk/core/src/test/java/org/codehaus/waffle/action/AnnotatedMethodDefinitionFinderTest.java
- trunk/core/src/test/java/org/codehaus/waffle/action/ParanamerMethodDefinitionFinderTest.java
- trunk/core/src/test/java/org/codehaus/waffle/action/RequestParameterMethodNameResolverTest.java
- trunk/core/src/test/java/org/codehaus/waffle/context/pico/PicoComponentRegistryTest.java
- trunk/core/src/test/java/org/codehaus/waffle/testmodel/StubMonitor.java
Added Paths
Removed Paths
Diff
Modified: trunk/core/src/main/java/org/codehaus/waffle/ComponentRegistry.java (267 => 268)
--- trunk/core/src/main/java/org/codehaus/waffle/ComponentRegistry.java 2007-07-16 21:53:20 UTC (rev 267) +++ trunk/core/src/main/java/org/codehaus/waffle/ComponentRegistry.java 2007-07-17 17:19:01 UTC (rev 268) @@ -24,7 +24,7 @@ import org.codehaus.waffle.controller.ControllerDefinitionFactory; import org.codehaus.waffle.controller.ControllerNameResolver; import org.codehaus.waffle.i18n.MessageResources; -import org.codehaus.waffle.monitor.Monitor; +import org.codehaus.waffle.monitor.ActionMonitor; import org.codehaus.waffle.validation.Validator; import org.codehaus.waffle.view.DispatchAssistant; import org.codehaus.waffle.view.ViewDispatcher; @@ -65,7 +65,7 @@ MethodNameResolver getMethodNameResolver(); - Monitor getMonitor(); + ActionMonitor getMonitor(); RequestAttributeBinder getRequestAttributeBinder();
Modified: trunk/core/src/main/java/org/codehaus/waffle/action/AbstractMethodDefinitionFinder.java (267 => 268)
--- trunk/core/src/main/java/org/codehaus/waffle/action/AbstractMethodDefinitionFinder.java 2007-07-16 21:53:20 UTC (rev 267) +++ trunk/core/src/main/java/org/codehaus/waffle/action/AbstractMethodDefinitionFinder.java 2007-07-17 17:19:01 UTC (rev 268) @@ -30,7 +30,7 @@ import org.codehaus.waffle.WaffleException; import org.codehaus.waffle.action.annotation.DefaultActionMethod; -import org.codehaus.waffle.monitor.Monitor; +import org.codehaus.waffle.monitor.ActionMonitor; /** * Abstract base implementation for all method definition finders @@ -50,13 +50,13 @@ private final ArgumentResolver argumentResolver; private final TypeConverter typeConverter; private final MethodNameResolver methodNameResolver; - private final Monitor monitor; + private final ActionMonitor monitor; public AbstractMethodDefinitionFinder(ServletContext servletContext, ArgumentResolver argumentResolver, TypeConverter typeConverter, MethodNameResolver methodNameResolver, - Monitor monitor) { + ActionMonitor monitor) { this.servletContext = servletContext; this.argumentResolver = argumentResolver; this.typeConverter = typeConverter;
Modified: trunk/core/src/main/java/org/codehaus/waffle/action/AnnotatedMethodDefinitionFinder.java (267 => 268)
--- trunk/core/src/main/java/org/codehaus/waffle/action/AnnotatedMethodDefinitionFinder.java 2007-07-16 21:53:20 UTC (rev 267) +++ trunk/core/src/main/java/org/codehaus/waffle/action/AnnotatedMethodDefinitionFinder.java 2007-07-17 17:19:01 UTC (rev 268) @@ -21,7 +21,7 @@ import ognl.TypeConverter; import org.codehaus.waffle.action.annotation.ActionMethod; -import org.codehaus.waffle.monitor.Monitor; +import org.codehaus.waffle.monitor.ActionMonitor; /** * Annotation-based method definition finder. @@ -38,7 +38,7 @@ ArgumentResolver argumentResolver, TypeConverter typeConverter, MethodNameResolver methodNameResolver, - Monitor monitor) { + ActionMonitor monitor) { super(servletContext, argumentResolver, typeConverter, methodNameResolver, monitor); }
Modified: trunk/core/src/main/java/org/codehaus/waffle/action/ParanamerMethodDefinitionFinder.java (267 => 268)
--- trunk/core/src/main/java/org/codehaus/waffle/action/ParanamerMethodDefinitionFinder.java 2007-07-16 21:53:20 UTC (rev 267) +++ trunk/core/src/main/java/org/codehaus/waffle/action/ParanamerMethodDefinitionFinder.java 2007-07-17 17:19:01 UTC (rev 268) @@ -21,7 +21,7 @@ import ognl.TypeConverter; -import org.codehaus.waffle.monitor.Monitor; +import org.codehaus.waffle.monitor.ActionMonitor; import com.thoughtworks.paranamer.CachingParanamer; import com.thoughtworks.paranamer.ParameterNamesNotFoundException; @@ -43,7 +43,7 @@ ArgumentResolver argumentResolver, TypeConverter typeConverter, MethodNameResolver methodNameResolver, - Monitor monitor) { + ActionMonitor monitor) { super(servletContext, argumentResolver, typeConverter, methodNameResolver, monitor); }
Modified: trunk/core/src/main/java/org/codehaus/waffle/action/RequestParameterMethodNameResolver.java (267 => 268)
--- trunk/core/src/main/java/org/codehaus/waffle/action/RequestParameterMethodNameResolver.java 2007-07-16 21:53:20 UTC (rev 267) +++ trunk/core/src/main/java/org/codehaus/waffle/action/RequestParameterMethodNameResolver.java 2007-07-17 17:19:01 UTC (rev 268) @@ -12,7 +12,7 @@ import javax.servlet.http.HttpServletRequest; -import org.codehaus.waffle.monitor.Monitor; +import org.codehaus.waffle.monitor.ActionMonitor; /** * Implementation of method name resolver which returns the value of a configurable action parameter key, @@ -25,13 +25,13 @@ */ public class RequestParameterMethodNameResolver implements MethodNameResolver { private String methodParameterKey = "method"; - private Monitor monitor; + private ActionMonitor monitor; - public RequestParameterMethodNameResolver(Monitor monitor) { + public RequestParameterMethodNameResolver(ActionMonitor monitor) { this.monitor = monitor; } - public RequestParameterMethodNameResolver(RequestParameterMethodNameResolverConfig configuration, Monitor monitor) { + public RequestParameterMethodNameResolver(RequestParameterMethodNameResolverConfig configuration, ActionMonitor monitor) { this.methodParameterKey = configuration.getMethodParameterKey(); this.monitor = monitor; }
Modified: trunk/core/src/main/java/org/codehaus/waffle/context/pico/PicoComponentRegistry.java (267 => 268)
--- trunk/core/src/main/java/org/codehaus/waffle/context/pico/PicoComponentRegistry.java 2007-07-16 21:53:20 UTC (rev 267) +++ trunk/core/src/main/java/org/codehaus/waffle/context/pico/PicoComponentRegistry.java 2007-07-17 17:19:01 UTC (rev 268) @@ -37,7 +37,7 @@ import org.codehaus.waffle.controller.ControllerNameResolver; import org.codehaus.waffle.i18n.DefaultMessageResources; import org.codehaus.waffle.i18n.MessageResources; -import org.codehaus.waffle.monitor.Monitor; +import org.codehaus.waffle.monitor.ActionMonitor; import org.codehaus.waffle.monitor.SilentMonitor; import org.codehaus.waffle.validation.DefaultValidator; import org.codehaus.waffle.validation.Validator; @@ -85,7 +85,7 @@ register(MessageResources.class, DefaultMessageResources.class, servletContext); register(MethodDefinitionFinder.class, AnnotatedMethodDefinitionFinder.class, servletContext); register(MethodNameResolver.class, RequestParameterMethodNameResolver.class, servletContext); - register(Monitor.class, SilentMonitor.class, servletContext); + register(ActionMonitor.class, SilentMonitor.class, servletContext); register(RequestAttributeBinder.class, IntrospectingRequestAttributeBinder.class, servletContext); register(TypeConverter.class, OgnlTypeConverter.class, servletContext); register(Validator.class, DefaultValidator.class, servletContext); @@ -240,8 +240,8 @@ return locateByType(MethodNameResolver.class); } - public Monitor getMonitor() { - return locateByType(Monitor.class); + public ActionMonitor getMonitor() { + return locateByType(ActionMonitor.class); } public RequestAttributeBinder getRequestAttributeBinder() {
Modified: trunk/core/src/main/java/org/codehaus/waffle/monitor/AbstractWritingMonitor.java (267 => 268)
--- trunk/core/src/main/java/org/codehaus/waffle/monitor/AbstractWritingMonitor.java 2007-07-16 21:53:20 UTC (rev 267) +++ trunk/core/src/main/java/org/codehaus/waffle/monitor/AbstractWritingMonitor.java 2007-07-17 17:19:01 UTC (rev 268) @@ -22,7 +22,7 @@ * * @author Mauro Talevi */ -public abstract class AbstractWritingMonitor implements Monitor { +public abstract class AbstractWritingMonitor implements ActionMonitor { /** * Writes message for a given level. Concrete implementations should provide writing functionality.
Copied: trunk/core/src/main/java/org/codehaus/waffle/monitor/ActionMonitor.java (from rev 262, trunk/core/src/main/java/org/codehaus/waffle/monitor/Monitor.java) (0 => 268)
--- trunk/core/src/main/java/org/codehaus/waffle/monitor/ActionMonitor.java (rev 0) +++ trunk/core/src/main/java/org/codehaus/waffle/monitor/ActionMonitor.java 2007-07-17 17:19:01 UTC (rev 268) @@ -0,0 +1,37 @@ +/***************************************************************************** + * Copyright (C) 2005,2006 Michael Ward * + * All rights reserved. * + * ------------------------------------------------------------------------- * + * The software in this package is published under the terms of the BSD * + * style license a copy of which has been included with this distribution in * + * the LICENSE.txt file. * + * * + * Original code by: Mauro Talevi * + *****************************************************************************/ +package org.codehaus.waffle.monitor; + +import java.util.Set; + +import org.codehaus.waffle.action.MethodDefinition; + +/** + * Defines events that need to be monitored, eg for debugging purposes. + * + * Each implementing class can opt to disregard some of these events or handle them with + * different priorities. + * + * @author Mauro Talevi + */ +public interface ActionMonitor { + + void defaultActionMethodFound(MethodDefinition methodDefinition); + + void defaultActionMethodCached(Class<?> controllerType, MethodDefinition methodDefinition); + + void pragmaticActionMethodFound(MethodDefinition methodDefinition); + + void actionMethodFound(MethodDefinition methodDefinition); + + void methodNameResolved(String methodName, String methodKey, Set<String> keys); + +}
Deleted: trunk/core/src/main/java/org/codehaus/waffle/monitor/Monitor.java (267 => 268)
--- trunk/core/src/main/java/org/codehaus/waffle/monitor/Monitor.java 2007-07-16 21:53:20 UTC (rev 267) +++ trunk/core/src/main/java/org/codehaus/waffle/monitor/Monitor.java 2007-07-17 17:19:01 UTC (rev 268) @@ -1,37 +0,0 @@ -/***************************************************************************** - * Copyright (C) 2005,2006 Michael Ward * - * All rights reserved. * - * ------------------------------------------------------------------------- * - * The software in this package is published under the terms of the BSD * - * style license a copy of which has been included with this distribution in * - * the LICENSE.txt file. * - * * - * Original code by: Mauro Talevi * - *****************************************************************************/ -package org.codehaus.waffle.monitor; - -import java.util.Set; - -import org.codehaus.waffle.action.MethodDefinition; - -/** - * Defines events that need to be monitored, eg for debugging purposes. - * - * Each implementing class can opt to disregard some of these events or handle them with - * different priorities. - * - * @author Mauro Talevi - */ -public interface Monitor { - - void defaultActionMethodFound(MethodDefinition methodDefinition); - - void defaultActionMethodCached(Class<?> controllerType, MethodDefinition methodDefinition); - - void pragmaticActionMethodFound(MethodDefinition methodDefinition); - - void actionMethodFound(MethodDefinition methodDefinition); - - void methodNameResolved(String methodName, String methodKey, Set<String> keys); - -}
Modified: trunk/core/src/test/java/org/codehaus/waffle/action/AnnotatedMethodDefinitionFinderTest.java (267 => 268)
--- trunk/core/src/test/java/org/codehaus/waffle/action/AnnotatedMethodDefinitionFinderTest.java 2007-07-16 21:53:20 UTC (rev 267) +++ trunk/core/src/test/java/org/codehaus/waffle/action/AnnotatedMethodDefinitionFinderTest.java 2007-07-17 17:19:01 UTC (rev 268) @@ -14,7 +14,7 @@ import ognl.TypeConverter; import org.codehaus.waffle.action.annotation.DefaultActionMethod; -import org.codehaus.waffle.monitor.Monitor; +import org.codehaus.waffle.monitor.ActionMonitor; import org.codehaus.waffle.monitor.SilentMonitor; import org.codehaus.waffle.testmodel.SampleForMethodFinder; import org.jmock.Mock; @@ -23,7 +23,7 @@ public class AnnotatedMethodDefinitionFinderTest extends MockObjectTestCase { - private Monitor monitor = new SilentMonitor(); + private ActionMonitor monitor = new SilentMonitor(); public void testDefaultMethodReturned() throws NoSuchMethodException { // Mock HttpServletRequest
Modified: trunk/core/src/test/java/org/codehaus/waffle/action/ParanamerMethodDefinitionFinderTest.java (267 => 268)
--- trunk/core/src/test/java/org/codehaus/waffle/action/ParanamerMethodDefinitionFinderTest.java 2007-07-16 21:53:20 UTC (rev 267) +++ trunk/core/src/test/java/org/codehaus/waffle/action/ParanamerMethodDefinitionFinderTest.java 2007-07-17 17:19:01 UTC (rev 268) @@ -3,7 +3,7 @@ import ognl.DefaultTypeConverter; import ognl.TypeConverter; import org.codehaus.waffle.action.annotation.DefaultActionMethod; -import org.codehaus.waffle.monitor.Monitor; +import org.codehaus.waffle.monitor.ActionMonitor; import org.codehaus.waffle.monitor.SilentMonitor; import org.codehaus.waffle.testmodel.SampleForMethodFinder; import org.jmock.Mock; @@ -21,7 +21,7 @@ public class ParanamerMethodDefinitionFinderTest extends MockObjectTestCase { - private Monitor monitor = new SilentMonitor(); + private ActionMonitor monitor = new SilentMonitor(); public void testDefaultMethodReturned() throws NoSuchMethodException { // Mock HttpServletRequest
Modified: trunk/core/src/test/java/org/codehaus/waffle/action/RequestParameterMethodNameResolverTest.java (267 => 268)
--- trunk/core/src/test/java/org/codehaus/waffle/action/RequestParameterMethodNameResolverTest.java 2007-07-16 21:53:20 UTC (rev 267) +++ trunk/core/src/test/java/org/codehaus/waffle/action/RequestParameterMethodNameResolverTest.java 2007-07-17 17:19:01 UTC (rev 268) @@ -6,14 +6,14 @@ import javax.servlet.http.HttpServletRequest; -import org.codehaus.waffle.monitor.Monitor; +import org.codehaus.waffle.monitor.ActionMonitor; import org.codehaus.waffle.monitor.SilentMonitor; import org.jmock.Mock; import org.jmock.MockObjectTestCase; public class RequestParameterMethodNameResolverTest extends MockObjectTestCase { - private Monitor monitor = new SilentMonitor(); + private ActionMonitor monitor = new SilentMonitor(); public void testResolve() { Mock mockRequest = mock(HttpServletRequest.class);
Modified: trunk/core/src/test/java/org/codehaus/waffle/context/pico/PicoComponentRegistryTest.java (267 => 268)
--- trunk/core/src/test/java/org/codehaus/waffle/context/pico/PicoComponentRegistryTest.java 2007-07-16 21:53:20 UTC (rev 267) +++ trunk/core/src/test/java/org/codehaus/waffle/context/pico/PicoComponentRegistryTest.java 2007-07-17 17:19:01 UTC (rev 268) @@ -26,7 +26,7 @@ import org.codehaus.waffle.i18n.DefaultMessageResources; import org.codehaus.waffle.i18n.MessageResources; import org.codehaus.waffle.monitor.AbstractWritingMonitor; -import org.codehaus.waffle.monitor.Monitor; +import org.codehaus.waffle.monitor.ActionMonitor; import org.codehaus.waffle.testmodel.StubActionMethodExecutor; import org.codehaus.waffle.testmodel.StubActionMethodResponseHandler; import org.codehaus.waffle.testmodel.StubArgumentResolver; @@ -174,7 +174,7 @@ .with(eq(MethodNameResolver.class.getName())) .will(returnValue(StubMethodNameResolver.class.getName())); mockServletContext.expects(once()).method("getInitParameter") - .with(eq(Monitor.class.getName())) + .with(eq(ActionMonitor.class.getName())) .will(returnValue(StubMonitor.class.getName())); mockServletContext.expects(once()).method("getInitParameter") .with(eq(RequestAttributeBinder.class.getName()))
Modified: trunk/core/src/test/java/org/codehaus/waffle/testmodel/StubMonitor.java (267 => 268)
--- trunk/core/src/test/java/org/codehaus/waffle/testmodel/StubMonitor.java 2007-07-16 21:53:20 UTC (rev 267) +++ trunk/core/src/test/java/org/codehaus/waffle/testmodel/StubMonitor.java 2007-07-17 17:19:01 UTC (rev 268) @@ -3,9 +3,9 @@ import java.util.Set; import org.codehaus.waffle.action.MethodDefinition; -import org.codehaus.waffle.monitor.Monitor; +import org.codehaus.waffle.monitor.ActionMonitor; -public class StubMonitor implements Monitor { +public class StubMonitor implements ActionMonitor { public void defaultActionMethodFound(MethodDefinition methodDefinition) { }
To unsubscribe from this list please visit:
