Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Dynamically adding ChannelAdapter to MessageBus

  1. #11
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,853

    Default

    FileSource and FileTarget have been replaced by PollableFileSource and FileWritingMessageConsumer. These are now configurable in XML within the "file" namespace using the "inbound-channel-adapter" and "outbound-channel-adapter" elements. The documentation is being updated for the RC1 release (this week), and in the meantime, you can check out several samples in "org.springframework.integration.samples.filecopy" .

    Hope that helps.
    -Mark

  2. #12
    Join Date
    Apr 2008
    Posts
    14

    Default

    Hi Mark,

    Thanks for the swift reply.
    I figured out the use of the PollableFileSource, e.g.:

    FileSystemResource fsResource = new FileSystemResource(directory);
    PollableFileSource fileSource = new PollableFileSource();
    fileSource.setInputDirectory(fsResource);
    FileListFilter fileListFilter = new PatternMatchingFileListFilter(fileNamePattern);

    Still looking for alternatives for things like messageBus.lookupChannel("someChannel") and programmatically creating a channel adapter, e.g.:
    InboundChannelAdapter inboundChannelAdapter = new InboundChannelAdapter();

    Maybe I will wait for the RC1 documentation.

    Thanks,
    - Sjoerd

  3. #13
    Join Date
    May 2007
    Location
    Netherlands
    Posts
    614

    Default

    Code:
    FileReadingMessageSource => <file:inbound-channel-adapter/> and
    FileWritingMessageConsumer => <file:outbound-channel-adapter/>
    You should be able to find that in the latest documentation. If not you can create a documentation issue in JIRA as well. If you run an ant build it wil generate a zip that contains documentation. (you can find the svn url etc on the project page)
    Last edited by iwein; Nov 13th, 2008 at 01:56 AM. Reason: class renamed

  4. #14
    Join Date
    Apr 2008
    Posts
    14

    Default

    Hi Mark and Iwein,

    I can confirm that this works fine in the RC1 release, hooking up a FileReadingMessageSource (source), a MessageChannel, a SourcePollingChannelAdapter (for hooking up the source and the channel), a ServiceActivatingHandler and a EventDrivenConsumer (which actually invokes the handler).

    Compliments on the RC1 release, I really enjoy it.

    Cheers,
    - Sjoerd

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •