/** * Populate the {@link MessageChannel} name to the new {@link IntegrationFlowBuilder} chain. * The {@link org.springframework.integration.dsl.IntegrationFlow} {@code inputChannel}. * @param messageChannelName the name of existing {@link MessageChannel} bean. * The new {@link DirectChannel} bean will be created on context startup * if there is no bean with this name. * @return new {@link IntegrationFlowBuilder}. */ public static IntegrationFlowBuilder from(String messageChannelName) { return from(new MessageChannelReference(messageChannelName)); }
/** * Populate a {@link MessageChannelReference} instance * at the current {@link IntegrationFlow} chain position. * The provided {@code messageChannelName} is used for the bean registration * ({@link org.springframework.integration.channel.DirectChannel}), if there is no such a bean * in the application context. Otherwise the existing {@link MessageChannel} bean is used * to wire integration endpoints. * @param messageChannelName the bean name to use. * @return the current {@link IntegrationFlowDefinition}. */ public B channel(String messageChannelName) { return channel(new MessageChannelReference(messageChannelName)); }
/** * Populate the {@link MessageChannel} name to the new {@link IntegrationFlowBuilder} chain. * The {@link org.springframework.integration.dsl.IntegrationFlow} {@code inputChannel}. * @param messageChannelName the name of existing {@link MessageChannel} bean. * The new {@link DirectChannel} bean will be created on context startup * if there is no bean with this name. * @return new {@link IntegrationFlowBuilder}. */ public static IntegrationFlowBuilder from(String messageChannelName) { return from(new MessageChannelReference(messageChannelName)); }
/** * Populate a {@link MessageChannelReference} instance * at the current {@link IntegrationFlow} chain position. * The provided {@code messageChannelName} is used for the bean registration * ({@link org.springframework.integration.channel.DirectChannel}), if there is no such a bean * in the application context. Otherwise the existing {@link MessageChannel} bean is used * to wire integration endpoints. * @param messageChannelName the bean name to use. * @return the current {@link IntegrationFlowDefinition}. */ public B channel(String messageChannelName) { return channel(new MessageChannelReference(messageChannelName)); }
/** * Populate a {@link MessageChannelReference} instance * at the current {@link IntegrationFlow} chain position. * The provided {@code messageChannelName} is used for the bean registration * ({@link org.springframework.integration.channel.DirectChannel}), if there is no such a bean * in the application context. Otherwise the existing {@link MessageChannel} bean is used * to wire integration endpoints. * @param messageChannelName the bean name to use. * @return the current {@link IntegrationFlowDefinition}. */ public B channel(String messageChannelName) { return channel(new MessageChannelReference(messageChannelName)); }
/** * Populate the {@link MessageChannel} name to the new {@link IntegrationFlowBuilder} chain. * The {@link org.springframework.integration.dsl.IntegrationFlow} {@code inputChannel}. * @param messageChannelName the name of existing {@link MessageChannel} bean. * The new {@link DirectChannel} bean will be created on context startup * if there is no bean with this name. * @return new {@link IntegrationFlowBuilder}. */ public static IntegrationFlowBuilder from(String messageChannelName) { return from(new MessageChannelReference(messageChannelName)); }
/** * Populate the {@link MessageChannel} name to the new {@link IntegrationFlowBuilder} chain. * The {@link org.springframework.integration.dsl.IntegrationFlow} {@code inputChannel}. * @param messageChannelName the name of existing {@link MessageChannel} bean. * The new {@link DirectChannel} bean will be created on context startup * if there is no bean with this name. * @return new {@link IntegrationFlowBuilder}. */ public static IntegrationFlowBuilder from(String messageChannelName) { return from(new MessageChannelReference(messageChannelName)); }
/** * Populate a {@link MessageChannelReference} instance * at the current {@link IntegrationFlow} chain position. * The provided {@code messageChannelName} is used for the bean registration * ({@link org.springframework.integration.channel.DirectChannel}), if there is no such a bean * in the application context. Otherwise the existing {@link MessageChannel} bean is used * to wire integration endpoints. * @param messageChannelName the bean name to use. * @return the current {@link IntegrationFlowDefinition}. */ public B channel(String messageChannelName) { return channel(new MessageChannelReference(messageChannelName)); }
@Override public void onInit() throws Exception { List<Recipient> recipients = new ArrayList<Recipient>(this.recipients.size()); for (Tuple2<?, ?> recipient : this.recipients) { if (recipient.getT1() instanceof String) { recipients.add(new DslRecipient(new MessageChannelReference((String) recipient.getT1()), populateRecipientSelector(recipient.getT2()))); } else { recipients.add(new Recipient((MessageChannel) recipient.getT1(), populateRecipientSelector(recipient.getT2()))); } } setRecipients(recipients); this.recipients.clear(); super.onInit(); }
@Override public void onInit() throws Exception { List<Recipient> recipients = new ArrayList<Recipient>(this.recipients.size()); for (Tuple2<?, ?> recipient : this.recipients) { if (recipient.getT1() instanceof String) { recipients.add(new DslRecipient(new MessageChannelReference((String) recipient.getT1()), populateRecipientSelector(recipient.getT2()))); } else { recipients.add(new Recipient((MessageChannel) recipient.getT1(), populateRecipientSelector(recipient.getT2()))); } } setRecipients(recipients); this.recipients.clear(); super.onInit(); }