5 Replies Latest reply on Feb 3, 2011 5:50 AM by drakenra

    fs listener multiple input suffix

    drakenra

      Hi!

       

      Is it possible to put FS (File system) listener to lookup multiple input-suffixes for example like *.xml,*.pdf,*.xls...? With only one, it seems to work fine.

       

      I am using JBoss ESB 4.9.

        • 1. fs listener multiple input suffix
          amigo111

          Hi. Did you find solution? I have the same problem.

          • 2. Re: fs listener multiple input suffix
            tcunning

            Input suffix doesn't support multiple file extension wildcards.  It does support leaving input suffix blank - maybe you could only shuttle the files you are interested in into the input directory?

            • 3. Re: fs listener multiple input suffix
              drakenra

              Hi amigo. No, I didn't find a good solution for it. I did make a workaround for it, similar like I did for the FTP http://community.jboss.org/thread/152949 problem that I had before. I used the ESB original source code, change it to seek and loop for more suffixis. Then I compiled it and replace the ESB original file with my changes.

              • 4. Re: fs listener multiple input suffix
                amigo111

                Hi, all. I found such solution. I set parameter file-filter-class

                <fs-listener name="FileCopyGateway" busidref="fileCopyChanngel" is-gateway="true"

                                             schedule-frequency="10">

                                    <property name="file-filter-class" value="ru.csbi.esb.filter.CopyFileFilter"/>

                </fs-litener>

                 

                and implemented CopyFileFilter

                 

                public class CopyFileFilter implements org.jboss.soa.esb.listeners.gateway.FileGatewayListener.FileFilterInit,FileFilter{
                  private String fileInputSuffix;
                  public boolean accept(File file) {
                    if(file==null)return false;
                  }

                  public void init(ConfigTree configTree) throws ConfigurationException {
                    this.fileInputSuffix =configTree.getAttribute(ListenerTagNames.FILE_INPUT_SFX_TAG);
                  }

                }

                 

                Now you can implement accept method how you want)

                • 5. Re: fs listener multiple input suffix
                  drakenra

                  Glad to hear that.