Package org.springframework.integration.endpoint

Examples of org.springframework.integration.endpoint.SourcePollingChannelAdapter.start()


      SessionFactory<LsEntry> sessionFactory = context.getBean(CachingSessionFactory.class);
      template = new RemoteFileTemplate<LsEntry>(sessionFactory);
      SftpTestUtils.createTestFiles(template, file1, file2, file3);

      SourcePollingChannelAdapter adapter = context.getBean(SourcePollingChannelAdapter.class);
      adapter.start();

      Message<?> received = localFileChannel.receive();
      assertNotNull("Expected file", received);
      System.out.println("Received first file message: " + received);
      received = localFileChannel.receive();
View Full Code Here


    @SuppressWarnings("unchecked")
    SessionFactory<FTPFile> sessionFactory = context.getBean(SessionFactory.class);
    SourcePollingChannelAdapter fileInbound = context.getBean(SourcePollingChannelAdapter.class);

    when(sessionFactory.getSession()).thenThrow(new RuntimeException("Force Failure"));
    fileInbound.start();

    LOGGER.info("\n========================================================="
          + "\n                                                          "
          + "\n    This is the Expression Advice Sample -                "
          + "\n                                                          "
View Full Code Here

    SourcePollingChannelAdapter fileInbound = context.getBean(SourcePollingChannelAdapter.class);

    @SuppressWarnings("unchecked")
    Session<FTPFile> session = mock(Session.class);
    when(sessionFactory.getSession()).thenReturn(session);
    fileInbound.start();

    LOGGER.info("\n========================================================="
          + "\n                                                          "
          + "\n    This is the Expression Advice Sample -                "
          + "\n                                                          "
View Full Code Here

          if ((!props.containsKey(platformType + ".tcp.host") || !props.containsKey(platformType + ".tcp.port")) && !props.containsKey(platformType + ".http.statusEndpointURIs")) {
            log.error("You have specified a list of paths to scan, but no valid endpoint to notify. Please add a <platform>.http.statusEndpointURIs property and/or <platform>.tcp.host/port properties in notification.properties");
          }
          else {
            spca.start();
          }
        }
        else {
          log.warn("You have not specified a list of " + platformType + " paths to scan. Please add a " + platformType.toLowerCase() + ".dataPaths property in notification.properties if you wish to track this platform");
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.