/** * Destroy an {@link IntegrationFlow} bean (as well as all its dependant beans) * for provided {@code flowId} and clean up all the local cache for it. * @param flowId the bean name to destroy from */ @Override public void remove(String flowId) { if (this.registry.containsKey(flowId)) { IntegrationFlowRegistration flowRegistration = this.registry.remove(flowId); flowRegistration.stop(); removeDependantBeans(flowId); this.beanDefinitionRegistry.removeBeanDefinition(flowId); } else { throw new IllegalStateException("An IntegrationFlow with the id " + "[" + flowId + "] doesn't exist in the registry."); } }
/** * Destroy an {@link IntegrationFlow} bean (as well as all its dependant beans) * for provided {@code flowId} and clean up all the local cache for it. * @param flowId the bean name to destroy from */ @Override public void remove(String flowId) { if (this.registry.containsKey(flowId)) { IntegrationFlowRegistration flowRegistration = this.registry.remove(flowId); flowRegistration.stop(); removeDependantBeans(flowId); this.beanDefinitionRegistry.removeBeanDefinition(flowId); } else { throw new IllegalStateException("An IntegrationFlow with the id " + "[" + flowId + "] doesn't exist in the registry."); } }