Skip to content

Doc for @Gateway in the @MessagingGateway #8578

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014-2022 the original author or authors.
* Copyright 2014-2023 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.
Expand Down Expand Up @@ -34,6 +34,8 @@
* to scan interfaces annotated with {@link MessagingGateway}, because the
* standard {@link org.springframework.context.annotation.ComponentScan}
* ignores interfaces.
* <p>
* The {@link Gateway} annotation can be used for the per interface method configuration.
*
* @author Artem Bilan
* @author Gary Russell
Expand All @@ -42,6 +44,7 @@
*
* @see IntegrationComponentScan
* @see MessageEndpoint
* @see Gateway
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
Expand All @@ -68,6 +71,7 @@
/**
* Identifies the default channel to which messages will be sent upon invocation
* of methods of the gateway proxy.
* See {@link Gateway#requestChannel()} for per-method configuration.
* @return the suggested channel name, if any
*/
String defaultRequestChannel() default "";
Expand All @@ -76,6 +80,7 @@
* Identifies the default channel the gateway proxy will subscribe to, to receive reply
* {@code Message}s, the payloads of
* which will be converted to the return type of the method signature.
* See {@link Gateway#replyChannel()} for per-method configuration.
* @return the suggested channel name, if any
*/
String defaultReplyChannel() default "";
Expand All @@ -95,6 +100,7 @@
* example if this gateway is hooked up to a {@code QueueChannel}. Value is specified
* in milliseconds; it can be a simple long value or a SpEL expression; array variable
* #args is available.
* See {@link Gateway#requestTimeout()} for per-method configuration.
* @return the suggested timeout in milliseconds, if any
*/
String defaultRequestTimeout() default "-9223372036854775808";
Expand All @@ -104,6 +110,7 @@
* before returning. By default, it will wait indefinitely. {@code null} is returned if
* the gateway times out. Value is specified in milliseconds; it can be a simple long
* value or a SpEL expression; array variable #args is available.
* See {@link Gateway#replyTimeout()} for per-method configuration.
* @return the suggested timeout in milliseconds, if any
*/
String defaultReplyTimeout() default "-9223372036854775808";
Expand All @@ -124,13 +131,15 @@
* unless explicitly overridden by a method declaration. Variables include {@code #args}, {@code #methodName},
* {@code #methodString} and {@code #methodObject};
* a bean resolver is also available, enabling expressions like {@code @someBean(#args)}.
* See {@link Gateway#payloadExpression()} for per-method configuration.
* @return the suggested payload expression, if any
*/
String defaultPayloadExpression() default "";

/**
* Provides custom message headers. These default headers are created for
* all methods on the service-interface (unless overridden by a specific method).
* See {@link Gateway#headers()} for per-method configuration.
* @return the suggested payload expression, if any
*/
GatewayHeader[] defaultHeaders() default {};
Expand Down