Class HttpRequestHandlingEndpointSupport

All Implemented Interfaces:
Aware, BeanFactoryAware, BeanNameAware, DisposableBean, InitializingBean, ApplicationContextAware, Lifecycle, Phased, SmartLifecycle, ExpressionCapable, OrderlyShutdownCapable, IntegrationPattern, NamedComponent, IntegrationInboundManagement, IntegrationManagement, ManageableLifecycle, ManageableSmartLifecycle, TrackableComponent
Direct Known Subclasses:
HttpRequestHandlingController, HttpRequestHandlingMessagingGateway

public abstract class HttpRequestHandlingEndpointSupport
extends BaseHttpInboundEndpoint
Base class for HTTP request handling endpoints.

By default GET and POST requests are accepted via a supplied default instance of RequestMapping. A GET request will generate a payload containing its 'parameterMap' while a POST request will be converted to a Message payload according to the registered HttpMessageConverters. Several are registered by default, but the list can be explicitly set via setMessageConverters(List).

To customize the mapping of request headers to the MessageHeaders, provide a reference to a org.springframework.integration.mapping.HeaderMapper<HttpHeaders> implementation to the BaseHttpInboundEndpoint.setHeaderMapper(org.springframework.integration.mapping.HeaderMapper) method.

The behavior is "request/reply" by default. Pass false to the constructor to force send-only as opposed to sendAndReceive. Send-only means that as soon as the Message is created and passed to the request channel, a response will be generated. Subclasses determine how that response is generated (e.g. simple status response or rendering a View).

In a request-reply scenario, the reply Message's payload will be extracted prior to generating a response by default. To have the entire serialized Message available for the response, switch the extractReplyPayload value to false.

Since:
2.0
Author:
Mark Fisher, Oleg Zhurakousky, Gary Russell, Artem Bilan, Biju Kunjummen, Trung Pham