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 */