Thanks Jerome,
Doh! It looks like I did get the Monday morning brain deadness. I
misunderstood the way the filters worked.
Thanks for clearing that up,
Jon
Jerome Louvel wrote:
Hi Jonathan,
Instead of having a unique chain of Filters for each Resource, can't you
create one chain only? You could attach your Router to your last Filter in
the chain, then normally attach the Resources to the Router.
Best regards,
Jerome
-----Message d'origine-----
De : Jonathan Hall [mailto:[EMAIL PROTECTED]
Envoyé : lundi 5 mars 2007 11:38
À : [email protected]
Objet : Filter chaining
Hi,
What is the solution for filtering particularly when using Spring and
still using the Restlet approach? After looking at the API
and examples,
I can't seem to find one.
At the minute, it seems it relies on setting setNext, which
is not ideal.
<!-- Maps the URI (entry key) to Resources finder -->
<bean id="manager" class="com.restlet.RestManager">
<property name="resourceMappings">
<bean class="java.util.HashMap">
<constructor-arg>
<map>
<entry key="/user/{user}">
<ref local="userSpringFinder"/>
</entry>
</map>
</constructor-arg>
</bean>
</property>
</bean>
The entry key would have to point to the topmost Filter bean
and not the
Resource/Finder/Restlet. That bean would then have to point
setNext to
the next filter bean, and so on until the Resource is passed.
This would
mean I would need a unique chain of Filter beans for every Resource.
Have I missed the solution for this (It is Monday morning here :) )?