/** * Register an {@link IntegrationFlow} and all the dependant and support components * in the application context and return an associated {@link IntegrationFlowRegistration} * control object. * @return the {@link IntegrationFlowRegistration} instance. */ @Override public IntegrationFlowRegistration register() { String id = this.integrationFlowRegistration.getId(); Assert.state(!this.idAsPrefix || StringUtils.hasText(id), "An 'id' must be present to use 'useFlowIdAsPrefix'"); if (this.idAsPrefix) { StandardIntegrationFlowContext.this.useFlowIdAsPrefix.put(id, this.idAsPrefix); } StandardIntegrationFlowContext.this.register(this); return this.integrationFlowRegistration; }
private void register(StandardIntegrationFlowRegistrationBuilder builder) { IntegrationFlow integrationFlow = builder.integrationFlowRegistration.getIntegrationFlow(); String flowId = builder.integrationFlowRegistration.getId(); Lock registerBeanLock = null; try {
@Test public void testIncludesDynamic() { Graph graph = this.server.getGraph(); assertThat(graph.getNodes().size()).isEqualTo(32); IntegrationFlow flow = f -> f.handle(m -> { }); IntegrationFlowRegistration reg = this.flowContext.registration(flow).register(); graph = this.server.rebuild(); assertThat(graph.getNodes().size()).isEqualTo(34); this.flowContext.remove(reg.getId()); graph = this.server.rebuild(); assertThat(graph.getNodes().size()).isEqualTo(32); }
private void register(StandardIntegrationFlowRegistrationBuilder builder) { IntegrationFlow integrationFlow = builder.integrationFlowRegistration.getIntegrationFlow(); String flowId = builder.integrationFlowRegistration.getId(); Lock registerBeanLock = null; try {
/** * Register an {@link IntegrationFlow} and all the dependant and support components * in the application context and return an associated {@link IntegrationFlowRegistration} * control object. * @return the {@link IntegrationFlowRegistration} instance. */ @Override public IntegrationFlowRegistration register() { String id = this.integrationFlowRegistration.getId(); Assert.state(!this.idAsPrefix || StringUtils.hasText(id), "An 'id' must be present to use 'useFlowIdAsPrefix'"); if (this.idAsPrefix) { StandardIntegrationFlowContext.this.useFlowIdAsPrefix.put(id, this.idAsPrefix); } StandardIntegrationFlowContext.this.register(this); return this.integrationFlowRegistration; }
.register(); String flowRegistrationId = flowRegistration.getId(); BeanFactoryHandler bean = this.beanFactory.getBean(flowRegistrationId + BeanFactoryHandler.class.getName() + "#0",
this.integrationFlowContext.messagingTemplateFor(flowRegistration.getId());
.register(); this.integrationFlowContext.messagingTemplateFor(flowRegistration.getId()) .send(new GenericMessage<>("test"));