"The master step must poll the job repository for workers status."); this.outputChannel = new NullChannel();
@Override public boolean send(Message<?> message, long timeout) { return send(message); }
@Override public Message<?> receive(long timeout) { return receive(); }
@Test public void testNullChannelInTheEndOfFlow() { this.nullChannel.setCountsEnabled(true); this.flowWithNullChannelInput.send(new GenericMessage<>("foo")); assertEquals(1, this.nullChannel.getSendCount()); this.nullChannel.setCountsEnabled(false); }
private TimerFacade sendTimer() { if (this.successTimer == null) { this.successTimer = this.metricsCaptor.timerBuilder(SEND_TIMER_NAME) .tag("type", "channel") .tag("name", getComponentName() == null ? "nullChannel" : getComponentName()) .tag("result", "success") .tag("exception", "none") .description("Subflow process time") .build(); } return this.successTimer; }
assertEquals(1, fromInbound.getPayload()); assertThat(this.source.getMessageCount(), greaterThanOrEqualTo(2)); assertThat(this.nullChannel.getSendCount(), greaterThanOrEqualTo(2)); assertThat(this.pubsub.getSendCount(), greaterThanOrEqualTo(2));
@Test public void testLocalNullChannel() { this.localNullChannel.setCountsEnabled(true); this.flowWithLocalNullChannelInput.send(new GenericMessage<>("foo")); assertEquals(1, this.localNullChannel.getSendCount()); assertNotSame(this.nullChannel, this.localNullChannel); }
private TimerFacade sendTimer() { if (this.successTimer == null) { this.successTimer = this.metricsCaptor.timerBuilder(SEND_TIMER_NAME) .tag("type", "channel") .tag("name", getComponentName() == null ? "nullChannel" : getComponentName()) .tag("result", "success") .tag("exception", "none") .description("Subflow process time") .build(); } return this.successTimer; }
@Bean public MessageChannel foo() { return new NullChannel(); }
@Test @DirtiesContext @Ignore public void testPerf() throws Exception { // this.nullChannel.enableStats(false); for (int i = 0; i < 1000000000; i++) { this.nullChannel.send(null); } }
@Override public Message<?> receive(long timeout) { return receive(); }
@Bean public IntegrationFlow flowWithLocalNullChannel() { return f -> f.channel(new NullChannel()); }
@Override public boolean send(Message<?> message, long timeout) { return send(message); }
public Message<?> receive(long timeout) { return this.receive(); }
@Bean @GlobalChannelInterceptor(patterns = "*") public WireTap baz() { return new WireTap(new NullChannel()); }
public boolean send(Message<?> message, long timeout) { return this.send(message); }
@Override protected FileTailingMessageProducerSupport doGet() { if (this.outputChannel == null) { this.factoryBean.setOutputChannel(new NullChannel()); } FileTailingMessageProducerSupport tailingMessageProducerSupport = null; try { this.factoryBean.afterPropertiesSet(); tailingMessageProducerSupport = this.factoryBean.getObject(); } catch (Exception e) { throw new IllegalStateException(e); } if (this.errorChannel != null) { tailingMessageProducerSupport.setErrorChannel(this.errorChannel); } tailingMessageProducerSupport.setOutputChannel(this.outputChannel); return tailingMessageProducerSupport; }
assertThat(e.getMessage()).isEqualTo("badPoll"); nullChannel.send(message); MeterRegistry registry = this.meterRegistry; assertThat(registry.get("spring.integration.channels").gauge().value()).isEqualTo(6);
this.discardChannel = new NullChannel();
private void configure(SourcePollingChannelAdapter adapter) { adapter.setOutputChannel(new NullChannel()); adapter.setBeanFactory(this.beanFactory); adapter.setTaskScheduler(this.threadPoolTaskScheduler); }