@Override public void start() { if (this.gatherEndpoint != null) { this.gatherEndpoint.start(); } }
@Override protected boolean isReactive() { return getOutputChannel() instanceof ReactiveStreamsSubscribableChannel && this.handler instanceof Subscriber; }
fileInbound.start();
@Override protected void onInit() { super.onInit(); if (this.evaluationContext == null) { this.evaluationContext = ExpressionUtils.createStandardEvaluationContext(this.getBeanFactory()); } }
@Override protected void onInit() { if (consumerProperties == null || !consumerProperties.getExtension().getEnabled()) { return; } super.onInit(); if (this.retryTemplate != null) { Assert.state(getErrorChannel() == null, "Cannot have an 'errorChannel' property when a 'RetryTemplate' is " + "provided; use an 'ErrorMessageSendingRecoverer' in the 'recoveryCallback' property to " + "send an error message when retries are exhausted"); } this.consumer = consumersManager.getOrCreateConsumer(group, destination, consumerProperties); Boolean isOrderly = consumerProperties.getExtension().getOrderly(); this.listener = isOrderly ? new CloudStreamMessageListenerOrderly() : new CloudStreamMessageListenerConcurrently(); if (retryTemplate != null) { this.retryTemplate.registerListener(this.listener); } }
@Override public void stop() { if (this.gatherEndpoint != null) { this.gatherEndpoint.stop(); } }
@Override public void setErrorChannel(MessageChannel errorChannel) { super.setErrorChannel(errorChannel); this.errorChannel = errorChannel; }
@Test public void testJobLaunchingGatewayIsRunning() throws Exception { setUp("JobLaunchingGatewayParserTestsRunning-context.xml", getClass()); assertTrue(this.consumer.isRunning()); final MessagingTemplate messagingTemplate = TestUtils.getPropertyValue(this.consumer, "handler.messagingTemplate", MessagingTemplate.class); final Long sendTimeout = TestUtils.getPropertyValue(messagingTemplate, "sendTimeout", Long.class); assertEquals("Wrong sendTimeout", Long.valueOf(-1L), sendTimeout); }
Session<FTPFile> session = mock(Session.class); when(sessionFactory.getSession()).thenReturn(session); fileInbound.start();
@Override // guarded by super#lifecycleLock protected void doStart() { if (this.replyMessageCorrelator != null) { this.replyMessageCorrelator.start(); } }
@Override // guarded by super#lifecycleLock protected void doStop() { if (this.replyMessageCorrelator != null) { this.replyMessageCorrelator.stop(); } }
@Test public void testGatewayParser() throws Exception { setUp("JobLaunchingGatewayParserTests-context.xml", getClass()); final AbstractMessageChannel inputChannel = TestUtils.getPropertyValue(this.consumer, "inputChannel", AbstractMessageChannel.class); assertEquals("requestChannel", inputChannel.getComponentName()); final JobLaunchingMessageHandler jobLaunchingMessageHandler = TestUtils.getPropertyValue(this.consumer, "handler.jobLaunchingMessageHandler", JobLaunchingMessageHandler.class); assertNotNull(jobLaunchingMessageHandler); final MessagingTemplate messagingTemplate = TestUtils.getPropertyValue(this.consumer, "handler.messagingTemplate", MessagingTemplate.class); final Long sendTimeout = TestUtils.getPropertyValue(messagingTemplate, "sendTimeout", Long.class); assertEquals("Wrong sendTimeout", Long.valueOf(123L), sendTimeout); assertFalse(this.consumer.isRunning()); }
@Before public void beforeTest() throws IOException { smtpServer.getMessages().clear(); tearDown(); this.fileInboundChannelAdapter.start(); }
@Override public void start() { if (this.endpoint != null) { this.endpoint.start(); } }
this.jmsInboundChannelAdapter.start();