From 183159139ba0322186f12d45fbea4439fad777b6 Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Tue, 18 Mar 2008 22:50:31 +0000 Subject: [PATCH] Extended Javadoc with configuration examples for HttpInvokerSourceAdapter. --- .../httpinvoker/HttpInvokerSourceAdapter.java | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/spring-integration-adapters/src/main/java/org/springframework/integration/adapter/httpinvoker/HttpInvokerSourceAdapter.java b/spring-integration-adapters/src/main/java/org/springframework/integration/adapter/httpinvoker/HttpInvokerSourceAdapter.java index 2c5cfdabc9..7a0a65d0e1 100644 --- a/spring-integration-adapters/src/main/java/org/springframework/integration/adapter/httpinvoker/HttpInvokerSourceAdapter.java +++ b/spring-integration-adapters/src/main/java/org/springframework/integration/adapter/httpinvoker/HttpInvokerSourceAdapter.java @@ -31,7 +31,32 @@ import org.springframework.util.Assert; import org.springframework.web.HttpRequestHandler; /** - * A source channel adapter for HttpInvoker-based remoting. + * A source channel adapter for HttpInvoker-based remoting. Since this class implements + * {@link HttpRequestHandler}, it can be configured with a delegating Servlet where the + * servlet-name matches this adapter's bean name. For example, the following servlet can + * be defined in web.xml: + * + *
+ * <servlet>
+ *     <servlet-name>httpInvokerSourceAdapter</servlet-name>
+ *     <servlet-class>org.springframework.web.context.support.HttpRequestHandlerServlet</servlet-class>
+ * </servlet>
+ * 
+ * + * And, this would match the following bean definition in the application context loaded + * by a {@link org.springframework.web.contextContextLoaderListener}: + * + *
+ * <bean id="httpInvokerSourceAdapter" class="org.springframework.integration.adapter.httpinvoker.HttpInvokerSourceAdapter">
+ *     <constructor-arg ref="exampleChannel"/>
+ * </bean>
+ * 
+ * + *

+ * Alternatively, in a Spring MVC application, the DispatcherServlet can delegate to the + * "httpInvokerSourceAdapter" bean based on a handler mapping configuration. In that case, + * the HttpRequestHandlerServlet would not be necessary. + *

* * @author Mark Fisher */