diff --git a/spring-integration-core/src/main/java/org/springframework/integration/annotation/Gateway.java b/spring-integration-core/src/main/java/org/springframework/integration/annotation/Gateway.java
index 993c9a1e54..b0c15a1f65 100644
--- a/spring-integration-core/src/main/java/org/springframework/integration/annotation/Gateway.java
+++ b/spring-integration-core/src/main/java/org/springframework/integration/annotation/Gateway.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2010 the original author or authors.
+ * Copyright 2002-2012 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,21 +28,22 @@ import java.lang.annotation.Target;
* or message payload. These method-level annotations are detected by the
* {@link org.springframework.integration.gateway.GatewayProxyFactoryBean}
* where the annotation attributes can override the default channel settings.
- *
+ *
*
A method annotated with @Gateway may accept a single non-annotated
* parameter of type {@link org.springframework.integration.Message}
* or of the intended Message payload type. Method parameters may be mapped
* to individual Message header values by using the {@link Header @Header}
* parameter annotation. Alternatively, to pass the entire Message headers
* map, a Map-typed parameter may be annotated with {@link Headers}.
- *
+ *
*
Return values from the annotated method may be of any type. If the
* declared return value is not a Message, the reply Message's payload will be
* returned and any type conversion as supported by Spring's
* {@link org.springframework.beans.SimpleTypeConverter} will be applied to
* the return value if necessary.
- *
+ *
* @author Mark Fisher
+ * @author Gary Russell
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@@ -54,8 +55,8 @@ public @interface Gateway {
String replyChannel() default "";
- long requestTimeout() default -1;
+ long requestTimeout() default Long.MIN_VALUE;
- long replyTimeout() default -1;
+ long replyTimeout() default Long.MIN_VALUE;
}
diff --git a/spring-integration-core/src/main/java/org/springframework/integration/gateway/GatewayProxyFactoryBean.java b/spring-integration-core/src/main/java/org/springframework/integration/gateway/GatewayProxyFactoryBean.java
index 4638252dd6..13a45b190f 100644
--- a/spring-integration-core/src/main/java/org/springframework/integration/gateway/GatewayProxyFactoryBean.java
+++ b/spring-integration-core/src/main/java/org/springframework/integration/gateway/GatewayProxyFactoryBean.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2011 the original author or authors.
+ * Copyright 2002-2012 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.
@@ -58,14 +58,15 @@ import org.springframework.util.StringUtils;
/**
* Generates a proxy for the provided service interface to enable interaction
- * with messaging components without application code being aware of them allowing
- * for POJO-style interaction.
+ * with messaging components without application code being aware of them allowing
+ * for POJO-style interaction.
* This component is also aware of the {@link ConversionService} set on the enclosing {@link BeanFactory}
- * under the name {@link IntegrationContextUtils#INTEGRATION_CONVERSION_SERVICE_BEAN_NAME} to
+ * under the name {@link IntegrationContextUtils#INTEGRATION_CONVERSION_SERVICE_BEAN_NAME} to
* perform type conversions when necessary (thanks to Jon Schneider's contribution and suggestion in INT-1230).
- *
+ *
* @author Mark Fisher
* @author Oleg Zhurakousky
+ * @author Gary Russell
*/
public class GatewayProxyFactoryBean extends AbstractEndpoint implements TrackableComponent, FactoryBean