Spring Integration

org.springframework.integration.http
Class DefaultInboundRequestMapper

java.lang.Object
  extended by org.springframework.integration.http.DefaultInboundRequestMapper
All Implemented Interfaces:
InboundRequestMapper, InboundMessageMapper<javax.servlet.http.HttpServletRequest>

public class DefaultInboundRequestMapper
extends Object
implements InboundRequestMapper

Default implementation of InboundRequestMapper for inbound HttpServletRequests. The request will be mapped according to the following rules:

In all cases, the original request headers will be passed in the MessageHeaders. Likewise, the following headers will be added:

Since:
1.0.2
Author:
Mark Fisher, Oleg Zhurakousky

Constructor Summary
DefaultInboundRequestMapper()
           
 
Method Summary
 void setCopyUploadedFiles(boolean copyUploadedFiles)
          Specify whether uploaded multipart files should be copied to a temporary file on the server.
 void setMultipartCharset(String multipartCharset)
          Specify the charset name to use when converting multipart file content into Strings.
 void setMultipartResolver(MultipartResolver multipartResolver)
          Specify the MultipartResolver to use when checking requests.
 Message<?> toMessage(javax.servlet.http.HttpServletRequest request)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultInboundRequestMapper

public DefaultInboundRequestMapper()
Method Detail

setMultipartResolver

public void setMultipartResolver(MultipartResolver multipartResolver)
Specify the MultipartResolver to use when checking requests. If no resolver is provided, this mapper will not support multipart requests.


setMultipartCharset

public void setMultipartCharset(String multipartCharset)
Specify the charset name to use when converting multipart file content into Strings.


setCopyUploadedFiles

public void setCopyUploadedFiles(boolean copyUploadedFiles)
Specify whether uploaded multipart files should be copied to a temporary file on the server. If this is set to 'true', the payload map will contain a File instance as the value for each multipart file entry. Otherwise the uploaded file's content will be converted to either a String or byte array based on the content-type (String for "text/*" and byte array otherwise). The default value is false.


toMessage

public Message<?> toMessage(javax.servlet.http.HttpServletRequest request)
                     throws Exception
Specified by:
toMessage in interface InboundMessageMapper<javax.servlet.http.HttpServletRequest>
Throws:
Exception

Spring Integration

Copyright © 2010. All Rights Reserved.