Results 1 to 2 of 2

Thread: FTP Handler

Hybrid View

  1. #1
    Join Date
    Dec 2006
    Posts
    108

    Default FTP Handler

    Hi,

    Just to summarize my understanding a bit, I configured an FTPSource adapter to retrieve files from our FTP server i.e. I configured a adapter and a channel to listen to that adapter....which worked fine no issues...

    I also wrote a message endpoint (MessageHandler if my understanding is correct) which listens on that channel like this just to see if it gets invoked by the message bus but it doesnt...so was wondering how would this thing work ? Any help would be appreciated..Thanks in advance

    This is my message endpoint

    Code:
    @MessageEndpoint(input="ftpChannel")
    public class FCPBFTPEndPoint {
        private static final Logger LOGGER = 
           Logger.getLogger(FCPBFTPEndPoint.class);
    
        @Handler
        public void handleFtp(Message message){
            LOGGER.debug("getting into this");
            LOGGER.debug("This message is" +message);
        }
    }
    This is my xml configuration
    Code:
        <message-bus/>
        <channel id="ftpChannel"/>
        <annotation-driven />

  2. #2
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,840

    Default

    It looks like you are very close.

    You just need to be sure that a bean definition is created for your endpoint. There are two ways you can do this: 1) use a <bean /> element or 2) define a <component-scan/> element that refers to a base-package containing that class (see the "cafeDemo.xml" in spring-integration-samples for an example of the latter).

    Hope that helps.
    -Mark

Posting Permissions

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