Apr 5th, 2007, 06:43 AM
I have implemented a "filter chain" factory (similar to what we have in HiveMind) and was wondering if someone else had already done something like this so that I could just use theirs (preferably accessible via Maven2). Basically, it's a factory which allows you to specify a service interface, a list of filters, and a terminus. Then, it will create a series of JDK dynamic proxies (I may use my Jakarta Commons Proxy library eventually) which makes sure all method calls on the outer proxy go through the filters and eventually terminate at the terminus bean. The filters don't have to adhere to any special interface (they can of course), so I guess you could say it supports "duck typing" in a way. They just need to provide methods which have the same signature except they've got an additional parameter tacked onto the end of the same type as the service interface (represents the "next" guy in the chain). Does anyone know of something like that already out there?
Apr 5th, 2007, 06:54 AM
Apr 5th, 2007, 07:11 AM
It's somewhat similar, but they're filtering web requests. I'm actually filtering method invocations themselves. I'm doing something similar to HiveMind's PipelineFactory. The documentation there has a nice illustration of what I'm trying to achieve.
Apr 5th, 2007, 07:34 AM
If anyone is interested in this code, I can post it. I have a TestNG unit test class that gives 100% coverage. Do we just post code directly in this forum?
Apr 5th, 2007, 07:41 AM
Apr 5th, 2007, 11:29 AM
I would agree with Andreas, raising it in JIRA would be a good idea. I think the ZIP file attachment limit is around 100k.
Apr 5th, 2007, 12:01 PM