Results 1 to 7 of 7

Thread: FilterChainFactoryBean

  1. #1
    Join Date
    Dec 2006
    Posts
    18

    Default FilterChainFactoryBean

    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?

  2. #2
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    Is this similar to what Acegi does?
    http://www.acegisecurity.org/multipr...hainProxy.html

  3. #3
    Join Date
    Dec 2006
    Posts
    18

    Default Re: FilterChainFactoryBean

    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.

  4. #4
    Join Date
    Dec 2006
    Posts
    18

    Default Re: FilterChainFactoryBean

    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?

  5. #5
    Join Date
    Aug 2004
    Posts
    2,715

    Default

    Quote Originally Posted by jwcarman View Post
    Do we just post code directly in this forum?
    If you zip it and it is not too large (don't ask me about what's too large ), you might post it as attachment. However, when you intend to donate the code to Spring (or a subproject as Spring modules) I would consider opening an Extension request in Jira and post it there. In the latter case you might post the link to the Jira issue here as reference.

    Regards,
    Andreas

  6. #6
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    I would agree with Andreas, raising it in JIRA would be a good idea. I think the ZIP file attachment limit is around 100k.

  7. #7
    Join Date
    Dec 2006
    Posts
    18

    Default Re: FilterChainFactoryBean


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •