title: list file names from a remote server directory
body: <p>I want to list the files recursively in a remote directory and its subdirectories as well. I know can do this by calling the listFiles method of ListGateway as:</p>
  
  <blockquote>
    <p>List list = listGateway.listFiles("/ussama/providers")</p>
  </blockquote>
  
  <pre><code>@MessagingGateway
  public interface ListGateway {
  
      @Gateway(requestChannel = "listSftpChannel")
      List&lt;File&gt; listFiles(String dir);
  
  }
  
  @Bean
  @ServiceActivator(inputChannel = "listSftpChannel")
  public MessageHandler handler() {
      SftpOutboundGateway sftpOutboundGateway = new SftpOutboundGateway(sftpSessionFactory(), "ls", "'/directory'");
      return  sftpOutboundGateway;
  }
  
  @Bean
  public IntegrationFlow sftpOutboundListFlow() {
      return IntegrationFlows.from("listSftpChannel")
              .handle(new SftpOutboundGateway(sftpSessionFactory(), "ls", "payload")
              ).get();
  }
  </code></pre>
  
  <p>But I want to do it after every x minutes. Is there a way i can poll the remote directory to list files after every x minutes. Plz give java configuration.</p>