Nandha0903
Nandha0903

Reputation: 35

int:gateway equivalent Java DSL

What is the Java DSL equivalent for int:gateway which has error channel and a default request channel. The default request channel is input to a transformer which sends JMS message to outbound adaptor and returns a listenable future.

Upvotes: 2

Views: 177

Answers (1)

Artem Bilan
Artem Bilan

Reputation: 121442

Something like this:

return IntegrationFlows.from(Gate.class)

/**
 * Populate the {@link MessageChannel} to the new {@link IntegrationFlowBuilder}
 * chain, which becomes as a {@code requestChannel} for the Messaging Gateway(s) built
 * on the provided service interface.
 * <p>A gateway proxy bean for provided service interface is registered under a name
 * from the
 * {@link org.springframework.integration.annotation.MessagingGateway#name()} if present
 * or from the {@link IntegrationFlow} bean name plus {@code .gateway} suffix.
 * @param serviceInterface the service interface class with an optional
 * {@link org.springframework.integration.annotation.MessagingGateway} annotation.
 * @return new {@link IntegrationFlowBuilder}.
 */
public static IntegrationFlowBuilder from(Class<?> serviceInterface) {

https://docs.spring.io/spring-integration/docs/current/reference/html/java-dsl.html#java-dsl-gateway

Upvotes: 2

Related Questions