INT-3262 JDK8 Javadoc Commit

Increase receive timeout for `Jsr223TransformerTests#testInt3162ScriptExecutorThreadSafety`.

JIRA: https://jira.springsource.org/browse/INT-3262
JIRA: https://jira.springsource.org/browse/INT-3263
This commit is contained in:
Gary Russell
2014-01-15 19:14:53 +02:00
committed by Artem Bilan
parent 66efb34342
commit c45b708341
249 changed files with 2265 additions and 985 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2010 the original author or authors.
* Copyright 2002-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -53,6 +53,8 @@ public class MultipartAwareFormHttpMessageConverter implements HttpMessageConver
/**
* Sets the character set used for writing form data.
*
* @param charset The charset.
*/
public void setCharset(Charset charset) {
this.wrappedConverter.setCharset(charset);
@@ -60,6 +62,8 @@ public class MultipartAwareFormHttpMessageConverter implements HttpMessageConver
/**
* Specify the {@link MultipartFileReader} to use when reading {@link MultipartFile} content.
*
* @param multipartFileReader The multipart file reader.
*/
public void setMultipartFileReader(MultipartFileReader<?> multipartFileReader) {
Assert.notNull(multipartFileReader, "multipartFileReader must not be null");

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -81,6 +81,8 @@ public class HttpRequestHandlingController extends HttpRequestHandlingEndpointSu
/**
* Specify the view name.
*
* @param viewName The view name.
*/
public void setViewName(String viewName) {
Assert.isTrue(StringUtils.hasText(viewName), "View name must contain text");
@@ -91,6 +93,8 @@ public class HttpRequestHandlingController extends HttpRequestHandlingEndpointSu
* Specify the key to be used when adding the reply Message or payload to the core map (will be payload only unless
* the value of {@link HttpRequestHandlingController#setExtractReplyPayload(boolean)} is <code>false</code>). The
* default key is "reply".
*
* @param replyKey The reply key.
*/
public void setReplyKey(String replyKey) {
this.replyKey = (replyKey != null) ? replyKey : DEFAULT_REPLY_KEY;
@@ -99,7 +103,8 @@ public class HttpRequestHandlingController extends HttpRequestHandlingEndpointSu
/**
* The key used to expose {@link Errors} in the core, in the case that message handling fails. Defaults to
* "errors".
* @param errorsKey the key value to set
*
* @param errorsKey The key value to set.
*/
public void setErrorsKey(String errorsKey) {
this.errorsKey = errorsKey;
@@ -111,7 +116,7 @@ public class HttpRequestHandlingController extends HttpRequestHandlingEndpointSu
* The default value is <code>spring.integration.http.handler.error</code>. Three arguments are provided: the
* exception, its message and its stack trace as a String.
*
* @param errorCode the error code to set
* @param errorCode The error code to set.
*/
public void setErrorCode(String errorCode) {
this.errorCode = errorCode;
@@ -120,6 +125,8 @@ public class HttpRequestHandlingController extends HttpRequestHandlingEndpointSu
/**
* Specifies a SpEL expression to evaluate in order to generate the view name.
* The EvaluationContext will be populated with the reply message as the root object,
*
* @param viewExpression The view expression.
*/
public void setViewExpression(Expression viewExpression) {
this.viewExpression = viewExpression;
@@ -135,6 +142,7 @@ public class HttpRequestHandlingController extends HttpRequestHandlingEndpointSu
* Handles the HTTP request by generating a Message and sending it to the request channel. If this gateway's
* 'expectReply' property is true, it will also generate a response from the reply Message once received.
*/
@Override
public final ModelAndView handleRequest(HttpServletRequest servletRequest, HttpServletResponse servletResponse)
throws Exception {
ModelAndView modelAndView = new ModelAndView();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -185,7 +185,7 @@ public abstract class HttpRequestHandlingEndpointSupport extends MessagingGatewa
}
/**
* @return whether to expect reply
* @return Whether to expect a reply.
*/
protected boolean isExpectReply() {
return expectReply;
@@ -194,6 +194,9 @@ public abstract class HttpRequestHandlingEndpointSupport extends MessagingGatewa
/**
* Set the path template for which this endpoint expects requests.
* May include path variable {keys} to match against.
*
* @param path The path.
*
* @deprecated since 3.0 in favor of {@linkplain #requestMapping}
*/
@Deprecated
@@ -202,8 +205,9 @@ public abstract class HttpRequestHandlingEndpointSupport extends MessagingGatewa
}
/**
* @deprecated since 3.0 in favor of {@linkplain #requestMapping}
*/
* @return The path.
* @deprecated since 3.0 in favor of {@linkplain #requestMapping}
*/
@Deprecated
String getPath() {
String[] pathPatterns = this.requestMapping.getPathPatterns();
@@ -222,6 +226,8 @@ public abstract class HttpRequestHandlingEndpointSupport extends MessagingGatewa
* <li><code>#matrixVariables</code></li>
* <li><code>#cookies</code>
* </ul>
*
* @param payloadExpression The payload expression.
*/
public void setPayloadExpression(Expression payloadExpression) {
this.payloadExpression = payloadExpression;
@@ -240,6 +246,8 @@ public abstract class HttpRequestHandlingEndpointSupport extends MessagingGatewa
* <li><code>#matrixVariables</code></li>
* <li><code>#cookies</code>
* </ul>
*
* @param headerExpressions The header expressions.
*/
public void setHeaderExpressions(Map<String, Expression> headerExpressions) {
this.headerExpressions = headerExpressions;
@@ -248,6 +256,8 @@ public abstract class HttpRequestHandlingEndpointSupport extends MessagingGatewa
/**
* Set the message body converters to use. These converters are used to convert from and to HTTP requests and
* responses.
*
* @param messageConverters The message converters.
*/
public void setMessageConverters(List<HttpMessageConverter<?>> messageConverters) {
Assert.noNullElements(messageConverters.toArray(), "'messageConverters' must not contain null entries");
@@ -267,6 +277,8 @@ public abstract class HttpRequestHandlingEndpointSupport extends MessagingGatewa
/**
* Flag which determines if the default converters should be available after
* custom converters.
*
* @param mergeWithDefaultConverters true to merge, false to replace.
*/
public void setMergeWithDefaultConverters(boolean mergeWithDefaultConverters) {
this.mergeWithDefaultConverters = mergeWithDefaultConverters;
@@ -274,6 +286,8 @@ public abstract class HttpRequestHandlingEndpointSupport extends MessagingGatewa
/**
* Set the {@link HeaderMapper} to use when mapping between HTTP headers and MessageHeaders.
*
* @param headerMapper The header mapper.
*/
public void setHeaderMapper(HeaderMapper<HttpHeaders> headerMapper) {
Assert.notNull(headerMapper, "headerMapper must not be null");
@@ -282,6 +296,8 @@ public abstract class HttpRequestHandlingEndpointSupport extends MessagingGatewa
/**
* Set the {@link RequestMapping} which allows you to specify a flexible RESTFul-mapping for this endpoint.
*
* @param requestMapping The request mapping.
*/
public void setRequestMapping(RequestMapping requestMapping) {
Assert.notNull(requestMapping, "requestMapping must not be null");
@@ -294,6 +310,9 @@ public abstract class HttpRequestHandlingEndpointSupport extends MessagingGatewa
/**
* Specify the supported request methods for this gateway. By default, only GET and POST are supported.
*
* @param supportedMethods The supported methods.
*
* @deprecated since 3.0 in favor to {@linkplain #requestMapping}
*/
@Deprecated
@@ -306,6 +325,8 @@ public abstract class HttpRequestHandlingEndpointSupport extends MessagingGatewa
* Specify the type of payload to be generated when the inbound HTTP request content is read by the
* {@link HttpMessageConverter}s. By default this value is null which means at runtime any "text" Content-Type will
* result in String while all others default to <code>byte[].class</code>.
*
* @param requestPayloadType The payload type.
*/
public void setRequestPayloadType(Class<?> requestPayloadType) {
this.requestPayloadType = requestPayloadType;
@@ -314,6 +335,8 @@ public abstract class HttpRequestHandlingEndpointSupport extends MessagingGatewa
/**
* Specify whether only the reply Message's payload should be passed in the response. If this is set to 'false', the
* entire Message will be used to generate the response. The default is 'true'.
*
* @param extractReplyPayload true to extract the reply payload.
*/
public void setExtractReplyPayload(boolean extractReplyPayload) {
this.extractReplyPayload = extractReplyPayload;
@@ -323,6 +346,8 @@ public abstract class HttpRequestHandlingEndpointSupport extends MessagingGatewa
* Specify the {@link MultipartResolver} to use when checking requests. If no resolver is provided, the
* "multipartResolver" bean in the context will be used as a fallback. If that is not available either, this
* endpoint will not support multipart requests.
*
* @param multipartResolver The multipart resolver.
*/
public void setMultipartResolver(MultipartResolver multipartResolver) {
this.multipartResolver = multipartResolver;
@@ -370,7 +395,10 @@ public abstract class HttpRequestHandlingEndpointSupport extends MessagingGatewa
* Handles the HTTP request by generating a Message and sending it to the request channel. If this gateway's
* 'expectReply' property is true, it will also generate a response from the reply Message once received.
*
* @return a the response Message
* @param servletRequest The servlet request.
* @param servletResponse The servlet response.
* @return The response Message.
* @throws IOException Any IOException.
*/
protected final Message<?> doHandleRequest(HttpServletRequest servletRequest, HttpServletResponse servletResponse) throws IOException {
if (this.isShuttingDown()) {
@@ -631,11 +659,13 @@ public abstract class HttpRequestHandlingEndpointSupport extends MessagingGatewa
return this.shuttingDown;
}
@Override
public int beforeShutdown() {
this.shuttingDown = true;
return this.activeCount.get();
}
@Override
public int afterShutdown() {
return this.activeCount.get();
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013 the original author or authors.
* Copyright 2013-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -39,13 +39,13 @@ import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandl
* detects and registers {@link RequestMappingInfo}s for {@link HttpRequestHandlingEndpointSupport}
* from a Spring Integration HTTP configuration of
* {@code <inbound-channel-adapter/>} and {@code <inbound-gateway/>} elements.
* <p/>
* <p>
* This class is automatically configured as a bean in the application context during the parsing phase of
* the {@code <inbound-channel-adapter/>} and {@code <inbound-gateway/>} elements, if there is none registered, yet.
* However it can be configured as a regular bean with appropriate configuration for
* {@link RequestMappingHandlerMapping}. It is recommended to have only one similar bean in the application context
* using the 'id' {@link org.springframework.integration.http.support.HttpContextUtils#HANDLER_MAPPING_BEAN_NAME}.
* <p/>
* <p>
* In most cases, Spring MVC offers to configure Request Mapping via {@code org.springframework.stereotype.Controller}
* and {@link org.springframework.web.bind.annotation.RequestMapping}.
* That's why Spring MVC's Handler Mapping infrastructure relies on {@link org.springframework.web.method.HandlerMethod},

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2010 the original author or authors.
* Copyright 2002-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,7 +28,7 @@ import org.springframework.web.multipart.MultipartFile;
* {@link MultipartFileReader} implementation that copies the MulitpartFile's
* content to a new temporary File in the specified directory. If no directory
* is provided, the Files will be created in the default temporary directory.
*
*
* @author Mark Fisher
* @since 2.0
*/
@@ -47,7 +47,7 @@ public class FileCopyingMultipartFileReader implements MultipartFileReader<Multi
/**
* Create a {@link FileCopyingMultipartFileReader} that creates temporary
* Files in the default temporary directory.
*/
*/
public FileCopyingMultipartFileReader() {
this(null);
}
@@ -55,6 +55,8 @@ public class FileCopyingMultipartFileReader implements MultipartFileReader<Multi
/**
* Create a {@link FileCopyingMultipartFileReader} that creates temporary
* Files in the given directory.
*
* @param directory The directory.
*/
public FileCopyingMultipartFileReader(File directory) {
this.directory = directory;
@@ -63,6 +65,8 @@ public class FileCopyingMultipartFileReader implements MultipartFileReader<Multi
/**
* Specify the prefix to use for temporary files.
*
* @param prefix The prefix.
*/
public void setPrefix(String prefix) {
this.prefix = prefix;
@@ -70,11 +74,14 @@ public class FileCopyingMultipartFileReader implements MultipartFileReader<Multi
/**
* Specify the suffix to use for temporary files.
*
* @param suffix The suffix.
*/
public void setSuffix(String suffix) {
this.suffix = suffix;
}
@Override
public MultipartFile readMultipartFile(MultipartFile multipartFile) throws IOException {
File upload = File.createTempFile(this.prefix, this.suffix, this.directory);
multipartFile.transferTo(upload);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2010 the original author or authors.
* Copyright 2002-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,7 +22,7 @@ import org.springframework.web.multipart.MultipartFile;
/**
* Strategy for reading {@link MultipartFile} content.
*
*
* @author mark Fisher
* @since 2.0
*/
@@ -30,6 +30,10 @@ public interface MultipartFileReader<T> {
/**
* Reads {@link MultipartFile} content.
*
* @param multipartFile The multipart file.
* @return The result of reading the file.
* @throws IOException Any IOException.
*/
T readMultipartFile(MultipartFile multipartFile) throws IOException;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2010 the original author or authors.
* Copyright 2002-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,8 +26,8 @@ import org.springframework.web.util.WebUtils;
/**
* {@link MultipartFileReader} implementation that does not maintain metadata from
* the original {@link MultipartFile} instance. Instead this simply reads the file
* content directly as either a String or byte array depending on the Content-Type.
*
* content directly as either a String or byte array depending on the Content-Type.
*
* @author Mark Fisher
* @since 2.0
*/
@@ -39,12 +39,15 @@ public class SimpleMultipartFileReader implements MultipartFileReader<Object> {
/**
* Specify the default charset name to use when converting multipart file
* content into Strings if the multipart itself does not provide a charset.
*
* @param defaultCharset The default charset.
*/
public void setDefaultMultipartCharset(String defaultCharset) {
this.defaultCharset = Charset.forName(
defaultCharset != null ? defaultCharset : WebUtils.DEFAULT_CHARACTER_ENCODING);
}
@Override
public Object readMultipartFile(MultipartFile multipartFile) throws IOException {
if (multipartFile.getContentType() != null && multipartFile.getContentType().startsWith("text")) {
MediaType contentType = MediaType.parseMediaType(multipartFile.getContentType());

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -45,7 +45,6 @@ import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.http.client.ClientHttpRequestFactory;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.messaging.MessageHandlingException;
import org.springframework.integration.expression.ExpressionEvalMap;
import org.springframework.integration.expression.ExpressionUtils;
import org.springframework.integration.handler.AbstractReplyProducingMessageHandler;
@@ -54,6 +53,7 @@ import org.springframework.integration.mapping.HeaderMapper;
import org.springframework.integration.support.MessageBuilder;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageHandler;
import org.springframework.messaging.MessageHandlingException;
import org.springframework.messaging.MessagingException;
import org.springframework.util.Assert;
import org.springframework.util.ClassUtils;
@@ -118,6 +118,8 @@ public class HttpRequestExecutingMessageHandler extends AbstractReplyProducingMe
/**
* Create a handler that will send requests to the provided URI.
*
* @param uri The URI.
*/
public HttpRequestExecutingMessageHandler(URI uri) {
this(uri.toString());
@@ -125,6 +127,8 @@ public class HttpRequestExecutingMessageHandler extends AbstractReplyProducingMe
/**
* Create a handler that will send requests to the provided URI.
*
* @param uri The URI.
*/
public HttpRequestExecutingMessageHandler(String uri) {
this(uri, null);
@@ -132,6 +136,8 @@ public class HttpRequestExecutingMessageHandler extends AbstractReplyProducingMe
/**
* Create a handler that will send requests to the provided URI Expression.
*
* @param uriExpression The URI expression.
*/
public HttpRequestExecutingMessageHandler(Expression uriExpression) {
this(uriExpression, null);
@@ -139,8 +145,8 @@ public class HttpRequestExecutingMessageHandler extends AbstractReplyProducingMe
/**
* Create a handler that will send requests to the provided URI using a provided RestTemplate
* @param uri
* @param restTemplate
* @param uri The URI.
* @param restTemplate The rest template.
*/
public HttpRequestExecutingMessageHandler(String uri, RestTemplate restTemplate) {
this(new LiteralExpression(uri), restTemplate);
@@ -156,7 +162,7 @@ public class HttpRequestExecutingMessageHandler extends AbstractReplyProducingMe
* Create a handler that will send requests to the provided URI using a provided RestTemplate
* @param uriExpression A SpEL Expression that can be resolved against the message object and
* {@link BeanFactory}.
* @param restTemplate
* @param restTemplate The rest template.
*/
public HttpRequestExecutingMessageHandler(Expression uriExpression, RestTemplate restTemplate) {
Assert.notNull(uriExpression, "URI Expression is required");
@@ -168,6 +174,8 @@ public class HttpRequestExecutingMessageHandler extends AbstractReplyProducingMe
* Specify whether the real URI should be encoded after <code>uriVariables</code>
* expanding and before send request via {@link RestTemplate}. The default value is <code>true</code>.
*
* @param encodeUri true if the URI should be encoded.
*
* @see UriComponentsBuilder
*/
public void setEncodeUri(boolean encodeUri) {
@@ -177,7 +185,7 @@ public class HttpRequestExecutingMessageHandler extends AbstractReplyProducingMe
/**
* Specify the SpEL {@link Expression} to determine {@link HttpMethod} dynamically
*
* @param httpMethodExpression
* @param httpMethodExpression The method expression.
*/
public void setHttpMethodExpression(Expression httpMethodExpression) {
Assert.notNull(httpMethodExpression, "'httpMethodExpression' must not be null");
@@ -186,6 +194,8 @@ public class HttpRequestExecutingMessageHandler extends AbstractReplyProducingMe
/**
* Specify the {@link HttpMethod} for requests. The default method will be POST.
*
* @param httpMethod The method.
*/
public void setHttpMethod(HttpMethod httpMethod) {
this.httpMethodExpression = new LiteralExpression(httpMethod.name());
@@ -195,6 +205,8 @@ public class HttpRequestExecutingMessageHandler extends AbstractReplyProducingMe
* Specify whether the outbound message's payload should be extracted
* when preparing the request body. Otherwise the Message instance itself
* will be serialized. The default value is <code>true</code>.
*
* @param extractPayload true if the payload should be extracted.
*/
public void setExtractPayload(boolean extractPayload) {
this.extractPayload = extractPayload;
@@ -204,6 +216,8 @@ public class HttpRequestExecutingMessageHandler extends AbstractReplyProducingMe
/**
* Specify the charset name to use for converting String-typed payloads to
* bytes. The default is 'UTF-8'.
*
* @param charset The charset.
*/
public void setCharset(String charset) {
Assert.isTrue(Charset.isSupported(charset), "unsupported charset '" + charset + "'");
@@ -213,6 +227,8 @@ public class HttpRequestExecutingMessageHandler extends AbstractReplyProducingMe
/**
* Specify whether a reply Message is expected. If not, this handler will simply return null for a
* successful response or throw an Exception for a non-successful response. The default is true.
*
* @param expectReply true if a reply is expected.
*/
public void setExpectReply(boolean expectReply) {
this.expectReply = expectReply;
@@ -224,6 +240,9 @@ public class HttpRequestExecutingMessageHandler extends AbstractReplyProducingMe
* be returned as a payload of the reply Message.
* To take advantage of the HttpMessageConverters
* registered on this adapter, provide a different type).
*
* @param expectedResponseType The expected type.
*
* Also see {@link #setExpectedResponseTypeExpression(Expression)}
*/
public void setExpectedResponseType(Class<?> expectedResponseType) {
@@ -235,6 +254,9 @@ public class HttpRequestExecutingMessageHandler extends AbstractReplyProducingMe
* Specify the {@link Expression} to determine the type for the expected response
* The returned value of the expression could be an instance of {@link Class} or
* {@link String} representing a fully qualified class name
*
* @param expectedResponseTypeExpression The expected response type expression.
*
* Also see {@link #setExpectedResponseTypeExpression(Expression)}
*/
public void setExpectedResponseTypeExpression(Expression expectedResponseTypeExpression) {
@@ -243,6 +265,9 @@ public class HttpRequestExecutingMessageHandler extends AbstractReplyProducingMe
/**
* Set the {@link ResponseErrorHandler} for the underlying {@link RestTemplate}.
*
* @param errorHandler The error handler.
*
* @see RestTemplate#setErrorHandler(ResponseErrorHandler)
*/
public void setErrorHandler(ResponseErrorHandler errorHandler) {
@@ -252,6 +277,9 @@ public class HttpRequestExecutingMessageHandler extends AbstractReplyProducingMe
/**
* Set a list of {@link HttpMessageConverter}s to be used by the underlying {@link RestTemplate}.
* Converters configured via this method will override the default converters.
*
* @param messageConverters The message converters.
*
* @see RestTemplate#setMessageConverters(java.util.List)
*/
public void setMessageConverters(List<HttpMessageConverter<?>> messageConverters) {
@@ -259,6 +287,8 @@ public class HttpRequestExecutingMessageHandler extends AbstractReplyProducingMe
}
/**
* @param headerMapper The header mapper.
*
* Set the {@link HeaderMapper} to use when mapping between HTTP headers and MessageHeaders.
*/
public void setHeaderMapper(HeaderMapper<HttpHeaders> headerMapper) {
@@ -268,6 +298,9 @@ public class HttpRequestExecutingMessageHandler extends AbstractReplyProducingMe
/**
* Set the {@link ClientHttpRequestFactory} for the underlying {@link RestTemplate}.
*
* @param requestFactory The request factory.
*
* @see RestTemplate#setRequestFactory(ClientHttpRequestFactory)
*/
public void setRequestFactory(ClientHttpRequestFactory requestFactory) {
@@ -277,6 +310,8 @@ public class HttpRequestExecutingMessageHandler extends AbstractReplyProducingMe
/**
* Set the Map of URI variable expressions to evaluate against the outbound message
* when replacing the variable placeholders in a URI template.
*
* @param uriVariableExpressions The URI variable expressions.
*/
public void setUriVariableExpressions(Map<String, Expression> uriVariableExpressions) {
synchronized (this.uriVariableExpressions) {
@@ -289,6 +324,8 @@ public class HttpRequestExecutingMessageHandler extends AbstractReplyProducingMe
* Set the {@link Expression} to evaluate against the outbound message; the expression
* must evaluate to a Map of URI variable expressions to evaluate against the outbound message
* when replacing the variable placeholders in a URI template.
*
* @param uriVariablesExpression The URI variables expression.
*/
public void setUriVariablesExpression(Expression uriVariablesExpression) {
this.uriVariablesExpression = uriVariablesExpression;
@@ -298,6 +335,7 @@ public class HttpRequestExecutingMessageHandler extends AbstractReplyProducingMe
* Set to true if you wish 'Set-Cookie' headers in responses to be
* transferred as 'Cookie' headers in subsequent interactions for
* a message.
*
* @param transferCookies the transferCookies to set.
*/
public void setTransferCookies(boolean transferCookies) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -47,9 +47,9 @@ import org.springframework.core.convert.TypeDescriptor;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org.springframework.messaging.MessageHeaders;
import org.springframework.integration.context.IntegrationContextUtils;
import org.springframework.integration.mapping.HeaderMapper;
import org.springframework.messaging.MessageHeaders;
import org.springframework.util.Assert;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
@@ -278,6 +278,8 @@ public class DefaultHttpHeaderMapper implements HeaderMapper<HttpHeaders>, BeanF
* <p>
* Any non-standard headers will be prefixed with the value specified by
* {@link DefaultHttpHeaderMapper#setUserDefinedHeaderPrefix(String)}. The default is 'X-'.
*
* @param outboundHeaderNames The outbound header names.
*/
public void setOutboundHeaderNames(String[] outboundHeaderNames) {
this.outboundHeaderNames = (outboundHeaderNames != null) ? outboundHeaderNames : new String[0];
@@ -291,6 +293,8 @@ public class DefaultHttpHeaderMapper implements HeaderMapper<HttpHeaders>, BeanF
* This will match the header name directly or, for non-standard HTTP headers, it will match
* the header name prefixed with the value specified by
* {@link DefaultHttpHeaderMapper#setUserDefinedHeaderPrefix(String)}. The default is 'X-'.
*
* @param inboundHeaderNames The inbound header names.
*/
public void setInboundHeaderNames(String[] inboundHeaderNames) {
this.inboundHeaderNames = (inboundHeaderNames != null) ? inboundHeaderNames : new String[0];
@@ -318,6 +322,8 @@ public class DefaultHttpHeaderMapper implements HeaderMapper<HttpHeaders>, BeanF
/**
* Sets the prefix to use with user-defined (non-standard) headers. Default is 'X-'.
*
* @param userDefinedHeaderPrefix The user defined header prefix.
*/
public void setUserDefinedHeaderPrefix(String userDefinedHeaderPrefix) {
this.userDefinedHeaderPrefix = (userDefinedHeaderPrefix != null) ? userDefinedHeaderPrefix : "";
@@ -989,6 +995,8 @@ public class DefaultHttpHeaderMapper implements HeaderMapper<HttpHeaders>, BeanF
* Factory method for creating a basic outbound mapper instance.
* This will map all standard HTTP request headers when sending an HTTP request,
* and it will map all standard HTTP response headers when receiving an HTTP response.
*
* @return The default outbound mapper.
*/
public static DefaultHttpHeaderMapper outboundMapper() {
DefaultHttpHeaderMapper mapper = new DefaultHttpHeaderMapper();
@@ -1002,6 +1010,8 @@ public class DefaultHttpHeaderMapper implements HeaderMapper<HttpHeaders>, BeanF
* Factory method for creating a basic inbound mapper instance.
* This will map all standard HTTP request headers when receiving an HTTP request,
* and it will map all standard HTTP response headers when sending an HTTP response.
*
* @return The default inbound mapper.
*/
public static DefaultHttpHeaderMapper inboundMapper() {
DefaultHttpHeaderMapper mapper = new DefaultHttpHeaderMapper();