|
From: Alef A. <al...@jt...> - 2004-06-21 07:29:13
|
I think it's a good idea to decouple the handlermappings from the interceptors. I don't think it's such a huge refactoring. Juergen, could you shed your light on the following: - refactoring of AbstractHandlerMapping into AbstractMapping, factoring out functionality used for both AbstractHandlerMapping and AbstractInterceptorMapping - subclass of AbstractMapping: AbstractUrlMapping, responsible for URL related stuff (including PathHelper) - subclasses: AbstractUrlInterceptorMapping and AbstractUrlHandlerMapping From there on the old hierarchy for handler mappings can continue, interceptor structure could be the same. We don't really need to change anything to the HandlerExecutionChain AFAIK. Opinions? Alef > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...] On Behalf > Of Seth Ladd > Sent: Saturday, June 19, 2004 5:16 AM > To: spr...@li... > Subject: [Springframework-developer] Proposal for Handler/Interceptor > Enhancement >=20 > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 >=20 > Hello, >=20 > I've been using the Handler/Interceptor feature of Spring MVC and I > really like it. I'd like to propose an enhancement to it that I think > will make it more flexible and easier to configure in the *-servlet.xml > file. >=20 > Right now, you must specify a new HandlerMapping class when you want to > create different combinations of Interceptors.I'd like to propose that > Interceptor -> Handler binding is done more like Filters and outside of > the HandlerMapping class. >=20 > One solution would be an InterceptorMapping class, which is configured > like a HandlerMapping class. It could contain a map of URIs to > interceptors. This InterceptorMapping class would be given to the > HandlerMapping class. The HandlerMapping class then calls something > like interceptorMapping.findInterceptors(servletRequest) when it's ready > to build a HandlerExecutionChain. >=20 > This would allow for all Handlers to use BeanNameHandlerMapping (or a > single HandlerMapping), but be configured with different Interceptors. > The binding of which Interceptor to be applied to which Handler is now > not part of the HandlerMapping. This cuts down on the number of > HandlerMappings to specify and configure, especially in high-Interceptor > usage scenarios. >=20 > Thoughts? Comments? If this is unclear, please let me know. Also, if > there's a better way to do this with existing code, then even better. :) >=20 > Mahalo! > Seth >=20 > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.3-nr1 (Windows XP) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org >=20 > iD8DBQFA06veKZsFSwtW+wIRAm+/AJ4hW4eVNWZgoZfe0Mk/WaBzhzZgXACfV1zP > O5hGTiOJRmxYO+mfntWlHOE=3D > =3D0RPV > -----END PGP SIGNATURE----- >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference > Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer > Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA > REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer >=20 >=20 |