diff --git a/org.springframework.integration.http/src/main/java/org/springframework/integration/http/HttpInboundEndpoint.java b/org.springframework.integration.http/src/main/java/org/springframework/integration/http/HttpInboundEndpoint.java index af68c5541d..92d0f91f65 100644 --- a/org.springframework.integration.http/src/main/java/org/springframework/integration/http/HttpInboundEndpoint.java +++ b/org.springframework.integration.http/src/main/java/org/springframework/integration/http/HttpInboundEndpoint.java @@ -40,6 +40,56 @@ import org.springframework.web.HttpRequestHandler; import org.springframework.web.servlet.View; /** + * An inbound endpoint for handling an HTTP request and generating a response. + *
+ * By default GET and POST requests are accepted, but the 'supportedMethods' + * property may be set to include others or limit the options (e.g. POST only). + * By default the request will be converted to a Message payload according to + * the following rules: + *false.
+ * This can be useful if you intend to use a MessageTransformer downstream
+ * to convert the request in some custom way.
+ *
+ * The value for {@link #expectReply} is false by default.
+ * This means that as soon as the Message is created and passed to the
+ * {@link #setRequestChannel(org.springframework.integration.core.MessageChannel) request channel},
+ * a response will be generated. If a {@link #setView(View) view} has been
+ * provided, it will be invoked to render the response, and it will have
+ * access to the 'requestMessage' in the model map. If no view is provided,
+ * and the 'expectReply' value is false then a simple OK
+ * status response will be issued.
+ *
+ * To handle request-reply scenarios, set the 'expectReply' flag to
+ * true. By default, the reply Message's payload will be
+ * extracted prior to generating a response. The payload must be either
+ * a String, a byte array, or a Serializable object. To have the entire
+ * serialized Message written as the response body, switch the
+ * {@link #extractReplyPayload} value to false.
+ *
+ * In the request-reply case, if a 'view' is provided, the response will
+ * not be generated directly from the reply Message or its extracted payload.
+ * Instead, the model map will be passed to that view, and it will contain
+ * either 'replyMessage' or 'replyPayload' depending on the value of
+ * {@link #extractReplyPayload}. The model map will also contain the
+ * original 'requestMessage'.
+ *
* @author Mark Fisher
* @since 1.0.2
*/