なみひらブログ

学んだことを日々記録する。~ since 2012/06/24 ~

DelegatingFilterProxyのjavadoc意訳

以下の意訳です。

http://static.springsource.org/spring/docs/1.2.x/api/org/springframework/web/filter/DelegatingFilterProxy.html

 

標準Servlet 2.3 FilterのProxy。Filterインターフェースを実装したSpring管理下のbeanに権利を移譲します。web.xml内でのターゲットのフィルターの初期値をサポートし、Spring application context内でターゲットのbeanの名前を明記する。

------------------------------------------------------------------------------------

Proxy for a standard Servlet 2.3 Filter, delegating to a Spring-managed bean that implements the Filter interface. Supports a "targetBeanName" filter init-param in web.xml, specifying the name of the target bean in the Spring application context.

------------------------------------------------------------------------------------

 

web.xmlは大抵DelegatingFilterProxy定義を含んでいます。そこには、Springのルートのapplication context内のbean名と一致するfilter-nameが明記されています。filter proxyはSpring Context内のそのbeanに権利を移譲します。それには、標準Servlet 2.3 Fiterインターフェースを実装してある必要があります。

--------------------------------------------------------------

web.xml will usually contain a DelegatingFilterProxy definition, with the specified filter-name corresponding to a bean name in Spring's root application context. All calls to the filter proxy will then be delegated to that bean in the Spring context, which is required to implement the standard Servlet 2.3 Filter interface.

--------------------------------------------------------------

 

このアプローチは、複雑なセットアップの必要なFilter実装に対して特に便利なものです。それは、全てSpringのbean定義がFilterインスタンスに適用できるためです。あるいは、標準Filterは、Springのルートのapplication contextからサービスbeanを探すことと組み合わせてセットアップします。

----------------------------------------------------------------

This approach is particularly useful for Filter implementation with complex setup needs, allowing to apply the full Spring bean definition machinery to Filter instances. Alternatively, consider standard Filter setup in combination with looking up service beans from the Spring root application context.

---------------------------------------------------------------