/** * Populate the "artificial" * {@link org.springframework.integration.gateway.GatewayMessageHandler} for the * provided {@code requestChannel} to send a request with default options. * Uses {@link org.springframework.integration.gateway.RequestReplyExchanger} Proxy * on the background. * @param requestChannel the {@link MessageChannel} bean name. * @return the current {@link IntegrationFlowDefinition}. */ public B gateway(String requestChannel) { return gateway(requestChannel, null); }
/** * Populate the "artificial" * {@link org.springframework.integration.gateway.GatewayMessageHandler} * for the provided {@code requestChannel} to send a request with default options. * Uses {@link org.springframework.integration.gateway.RequestReplyExchanger} Proxy on * the background. * @param requestChannel the {@link MessageChannel} to use. * @return the current {@link IntegrationFlowDefinition}. */ public B gateway(MessageChannel requestChannel) { return gateway(requestChannel, null); }
/** * Populate the "artificial" * {@link org.springframework.integration.gateway.GatewayMessageHandler} for the * provided {@code subflow}. * Typically used with a Java 8 Lambda expression: * <pre class="code"> * {@code * .gateway(f -> f.transform("From Gateway SubFlow: "::concat)) * } * </pre> * @param flow the {@link IntegrationFlow} to to send a request message and wait for reply. * @return the current {@link IntegrationFlowDefinition}. */ public B gateway(IntegrationFlow flow) { return gateway(flow, null); }
/** * Populate the "artificial" * {@link org.springframework.integration.gateway.GatewayMessageHandler} for the * provided {@code subflow} with options from {@link GatewayEndpointSpec}. * Typically used with a Java 8 Lambda expression: * <pre class="code"> * {@code * .gateway(f -> f.transform("From Gateway SubFlow: "::concat), e -> e.replyTimeout(100L)) * } * </pre> * @param flow the {@link IntegrationFlow} to to send a request message and wait for reply. * @param endpointConfigurer the {@link Consumer} to provide integration endpoint options. * @return the current {@link IntegrationFlowDefinition}. */ public B gateway(IntegrationFlow flow, Consumer<GatewayEndpointSpec> endpointConfigurer) { MessageChannel requestChannel = obtainInputChannelFromFlow(flow); return gateway(requestChannel, endpointConfigurer); }
@Bean public IntegrationFlow testGateway() { return f -> f.gateway("processChannel", g -> g.replyChannel("replyChannel")) .logAndReply(); }
/** * Populate the "artificial" * {@link org.springframework.integration.gateway.GatewayMessageHandler} * for the provided {@code requestChannel} to send a request with default options. * Uses {@link org.springframework.integration.gateway.RequestReplyExchanger} Proxy on * the background. * @param requestChannel the {@link MessageChannel} to use. * @return the current {@link IntegrationFlowDefinition}. */ public B gateway(MessageChannel requestChannel) { return gateway(requestChannel, null); }
/** * Populate the "artificial" * {@link org.springframework.integration.gateway.GatewayMessageHandler} for the * provided {@code requestChannel} to send a request with default options. * Uses {@link org.springframework.integration.gateway.RequestReplyExchanger} Proxy * on the background. * @param requestChannel the {@link MessageChannel} bean name. * @return the current {@link IntegrationFlowDefinition}. */ public B gateway(String requestChannel) { return gateway(requestChannel, null); }
/** * Populate the "artificial" {@link GatewayMessageHandler} for the provided * {@code requestChannel} to send a request with default options. * Uses {@link org.springframework.integration.gateway.RequestReplyExchanger} Proxy * on the background. * @param requestChannel the {@link MessageChannel} bean name. * @return the current {@link IntegrationFlowDefinition}. */ public B gateway(String requestChannel) { return gateway(requestChannel, null); }
/** * Populate the "artificial" {@link GatewayMessageHandler} for the provided * {@code requestChannel} to send a request with default options. * Uses {@link org.springframework.integration.gateway.RequestReplyExchanger} Proxy * on the background. * @param requestChannel the {@link MessageChannel} to use. * @return the current {@link IntegrationFlowDefinition}. */ public B gateway(MessageChannel requestChannel) { return gateway(requestChannel, null); }
/** * Populate the "artificial" {@link GatewayMessageHandler} for the provided * {@code requestChannel} to send a request with default options. * Uses {@link org.springframework.integration.gateway.RequestReplyExchanger} Proxy * on the background. * @param requestChannel the {@link MessageChannel} to use. * @return the current {@link IntegrationFlowDefinition}. */ public B gateway(MessageChannel requestChannel) { return gateway(requestChannel, null); }
/** * Populate the "artificial" {@link GatewayMessageHandler} for the provided * {@code requestChannel} to send a request with default options. * Uses {@link org.springframework.integration.gateway.RequestReplyExchanger} Proxy * on the background. * @param requestChannel the {@link MessageChannel} bean name. * @return the current {@link IntegrationFlowDefinition}. */ public B gateway(String requestChannel) { return gateway(requestChannel, null); }
/** * Populate the "artificial" {@link GatewayMessageHandler} for the provided * {@code subflow}. * Typically used with a Java 8 Lambda expression: * <pre class="code"> * {@code * .gateway(f -> f.transform("From Gateway SubFlow: "::concat)) * } * </pre> * @param flow the {@link IntegrationFlow} to to send a request message and wait for reply. * @return the current {@link IntegrationFlowDefinition}. */ public B gateway(IntegrationFlow flow) { return gateway(flow, null); }
/** * Populate the "artificial" {@link GatewayMessageHandler} for the provided * {@code subflow}. * Typically used with a Java 8 Lambda expression: * <pre class="code"> * {@code * .gateway(f -> f.transform("From Gateway SubFlow: "::concat)) * } * </pre> * @param flow the {@link IntegrationFlow} to to send a request message and wait for reply. * @return the current {@link IntegrationFlowDefinition}. */ public B gateway(IntegrationFlow flow) { return gateway(flow, null); }
/** * Populate the "artificial" * {@link org.springframework.integration.gateway.GatewayMessageHandler} for the * provided {@code subflow}. * Typically used with a Java 8 Lambda expression: * <pre class="code"> * {@code * .gateway(f -> f.transform("From Gateway SubFlow: "::concat)) * } * </pre> * @param flow the {@link IntegrationFlow} to to send a request message and wait for reply. * @return the current {@link IntegrationFlowDefinition}. */ public B gateway(IntegrationFlow flow) { return gateway(flow, null); }
/** * Populate the "artificial" * {@link org.springframework.integration.gateway.GatewayMessageHandler} for the * provided {@code subflow} with options from {@link GatewayEndpointSpec}. * Typically used with a Java 8 Lambda expression: * <pre class="code"> * {@code * .gateway(f -> f.transform("From Gateway SubFlow: "::concat), e -> e.replyTimeout(100L)) * } * </pre> * @param flow the {@link IntegrationFlow} to to send a request message and wait for reply. * @param endpointConfigurer the {@link Consumer} to provide integration endpoint options. * @return the current {@link IntegrationFlowDefinition}. */ public B gateway(IntegrationFlow flow, Consumer<GatewayEndpointSpec> endpointConfigurer) { MessageChannel requestChannel = obtainInputChannelFromFlow(flow); return gateway(requestChannel, endpointConfigurer); }
@Bean public IntegrationFlow testGateway() { return f -> f.gateway("processChannel", g -> g.replyChannel("replyChannel")); }
/** * Populate the "artificial" {@link GatewayMessageHandler} for the provided * {@code subflow} with options from {@link GatewayEndpointSpec}. * Typically used with a Java 8 Lambda expression: * <pre class="code"> * {@code * .gateway(f -> f.transform("From Gateway SubFlow: "::concat), e -> e.replyTimeout(100L)) * } * </pre> * @param flow the {@link IntegrationFlow} to to send a request message and wait for reply. * @param endpointConfigurer the {@link Consumer} to provide integration endpoint options. * @return the current {@link IntegrationFlowDefinition}. */ public B gateway(IntegrationFlow flow, Consumer<GatewayEndpointSpec> endpointConfigurer) { Assert.notNull(flow, "'flow' must not be null"); final DirectChannel requestChannel = new DirectChannel(); IntegrationFlowBuilder flowBuilder = IntegrationFlows.from(requestChannel); flow.configure(flowBuilder); addComponent(flowBuilder.get()); return gateway(requestChannel, endpointConfigurer); }
/** * Populate the "artificial" {@link GatewayMessageHandler} for the provided * {@code subflow} with options from {@link GatewayEndpointSpec}. * Typically used with a Java 8 Lambda expression: * <pre class="code"> * {@code * .gateway(f -> f.transform("From Gateway SubFlow: "::concat), e -> e.replyTimeout(100L)) * } * </pre> * @param flow the {@link IntegrationFlow} to to send a request message and wait for reply. * @param endpointConfigurer the {@link Consumer} to provide integration endpoint options. * @return the current {@link IntegrationFlowDefinition}. */ public B gateway(IntegrationFlow flow, Consumer<GatewayEndpointSpec> endpointConfigurer) { Assert.notNull(flow, "'flow' must not be null"); final DirectChannel requestChannel = new DirectChannel(); IntegrationFlowBuilder flowBuilder = IntegrationFlows.from(requestChannel); flow.configure(flowBuilder); addComponent(flowBuilder.get()); return gateway(requestChannel, endpointConfigurer); }