/** * Populate the {@code Wire Tap} EI Pattern specific * {@link org.springframework.messaging.support.ChannelInterceptor} implementation. * @param wireTapChannel the {@link MessageChannel} instance to wire-tap. * @return the current {@link MessageChannelSpec}. * @since 1.2 * @see WireTapSpec */ public S wireTap(MessageChannel wireTapChannel) { return wireTap(new WireTapSpec(wireTapChannel)); }
/** * Populate the {@code Wire Tap} EI Pattern specific * {@link org.springframework.messaging.support.ChannelInterceptor} implementation. * @param wireTapChannel the {@link MessageChannel} bean name to wire-tap. * @return the current {@link MessageChannelSpec}. * @since 1.2 * @see WireTapSpec */ public S wireTap(String wireTapChannel) { return wireTap(new WireTapSpec(wireTapChannel)); }
/** * Populate the {@code Wire Tap} EI Pattern specific * {@link org.springframework.messaging.support.ChannelInterceptor} implementation. * @param wireTapChannel the {@link MessageChannel} bean name to wire-tap. * @return the current {@link MessageChannelSpec}. * @since 1.2 * @see WireTapSpec */ public S wireTap(String wireTapChannel) { return wireTap(new WireTapSpec(wireTapChannel)); }
/** * Populate the {@code Wire Tap} EI Pattern specific * {@link org.springframework.messaging.support.ChannelInterceptor} implementation. * @param wireTapChannel the {@link MessageChannel} instance to wire-tap. * @return the current {@link MessageChannelSpec}. * @since 1.2 * @see WireTapSpec */ public S wireTap(MessageChannel wireTapChannel) { return wireTap(new WireTapSpec(wireTapChannel)); }
/** * Populate the {@code Wire Tap} EI Pattern specific * {@link org.springframework.messaging.support.ChannelInterceptor} implementation * to the current {@link #currentMessageChannel}. * It is useful when an implicit {@link MessageChannel} is used between endpoints: * <pre class="code"> * {@code * .transform("payload") * .wireTap(tapChannel(), wt -> wt.selector(m -> m.getPayload().equals("foo"))) * .channel("foo") * } * </pre> * This method can be used after any {@link #channel} for explicit {@link MessageChannel}, * but with the caution do not impact existing {@link org.springframework.messaging.support.ChannelInterceptor}s. * @param wireTapChannel the {@link MessageChannel} to wire-tap. * @param wireTapConfigurer the {@link Consumer} to accept options for the {@link WireTap}. * @return the current {@link IntegrationFlowDefinition}. */ public B wireTap(MessageChannel wireTapChannel, Consumer<WireTapSpec> wireTapConfigurer) { WireTapSpec wireTapSpec = new WireTapSpec(wireTapChannel); if (wireTapConfigurer != null) { wireTapConfigurer.accept(wireTapSpec); } addComponent(wireTapChannel); return wireTap(wireTapSpec); }
/** * Populate the {@code Wire Tap} EI Pattern specific * {@link org.springframework.messaging.support.ChannelInterceptor} implementation * to the current {@link #currentMessageChannel}. * It is useful when an implicit {@link MessageChannel} is used between endpoints: * <pre class="code"> * {@code * .transform("payload") * .wireTap(tapChannel(), wt -> wt.selector(m -> m.getPayload().equals("foo"))) * .channel("foo") * } * </pre> * This method can be used after any {@link #channel} for explicit {@link MessageChannel}, * but with the caution do not impact existing {@link org.springframework.messaging.support.ChannelInterceptor}s. * @param wireTapChannel the {@link MessageChannel} to wire-tap. * @param wireTapConfigurer the {@link Consumer} to accept options for the {@link WireTap}. * @return the current {@link IntegrationFlowDefinition}. */ public B wireTap(MessageChannel wireTapChannel, Consumer<WireTapSpec> wireTapConfigurer) { WireTapSpec wireTapSpec = new WireTapSpec(wireTapChannel); if (wireTapConfigurer != null) { wireTapConfigurer.accept(wireTapSpec); } addComponent(wireTapChannel); return wireTap(wireTapSpec); }