---------- Forwarded message ---------- From: Buddhima Wijeweera <[email protected]> Date: Mon, Sep 28, 2015 at 10:33 AM Subject: Re: Custom Inbound To: Kalyani Yogeswaranathan <[email protected]>
Hi Kalyani, The resource you found is correct. I basically contains 2 methods. init()- should contain the logic you have to do (reading, etc.) destroy() - should contain any thing you need to clean when destroying the inbound. for ex. close directory references. If you have any parameters to consider, in addition to default ones, get them at constructor. Sample implementation of such an inbound can be found at : https://github.com/wso2/carbon-mediation/blob/master/components/inbound-endpoints/org.wso2.carbon.inbound.endpoint.ext.wsrm/src/main/java/org/wso2/carbon/inbound/endpoint/ext/wsrm/InboundRMHttpListener.java The thing I'm not clear about is , how to identify which files should be copy, move etc. *Can you let me know on that, and how should inbound configuration should look like?* Sample config for the InboundRMHttpListener is: https://docs.wso2.com/display/ESB490/CXF+WS-RM+Inbound+Protocol --> Sample CXF WS-RM Inbound Thanks, Buddhima On Mon, Sep 28, 2015 at 10:08 AM, Kalyani Yogeswaranathan <[email protected]> wrote: > Hi Buddhima, > > This Local File Inbound/Connector should be *listening* inbound. Already > existing File inbound is *Polling* inbound. > > In Local File Inbound it should process the files within the hard disk > (local files). Use case of this inbound is using *NIO* will be optimising > the local files process. > > So here we are going to do as *listening inbound*. And I found > https://github.com/wso2-docs/ESB/blob/master/ESB-Artifacts/inbound/custom_inbound_listening/src/main/java/org/wso2/carbon/inbound/custom/listening/SampleListeningEP.java. > <https://github.com/wso2-docs/ESB/blob/master/ESB-Artifacts/inbound/custom_inbound_listening/src/main/java/org/wso2/carbon/inbound/custom/listening/SampleListeningEP.java> > > *Methods* > > - > > Create : Creates a file or directory. > - > > Copy : Copies a file. > - > > Read : Reads content from a file. > - > > Rename : Renames a file or folder. > - > > Delete : Deletes a file or directory. > - > > Move : Move a files or directory. > - > > search : Finds a file based on a file pattern.(xml/text) > - > > isFileExist : Checks the existence of a file. > > > Any guide on this? > > Thanks > > On Sat, Sep 26, 2015 at 11:55 PM, Kalyani Yogeswaranathan < > [email protected]> wrote: > >> Hi, >> >> Thanks for your reply. I'll go through it. >> >> Thanks. >> >> On Sat, Sep 26, 2015 at 11:51 PM, Buddhima Wijeweera <[email protected]> >> wrote: >> >>> Hi Kalyani, >>> >>> I assume through "Local File Inbound/Connector", will fetch the files >>> from a given location. >>> If so, then you need to implement a *polling inbound*. >>> In ESB 4.9.0 docs, >>> https://docs.wso2.com/display/ESB490/Custom+Inbound+Endpoint shows >>> about implementing a custom inbound. >>> By looking at the sample given in doc, you will see >>> >>> https://github.com/wso2-docs/ESB/blob/master/ESB-Artifacts/inbound/custom_inbound/src/main/java/org/wso2/carbon/inbound/custom/poll/SamplePollingClient.java >>> >>> In that class, the *poll()* method of the parent has overwritten with >>> custom logic. Similarly at that point, you can implement your logic. >>> >>> You can use constructor of that class to initialize any additional >>> settings required for this inbound, other than generic ones. >>> >>> Thanks, >>> >>> On Sat, Sep 26, 2015 at 11:27 PM, Kalyani Yogeswaranathan < >>> [email protected]> wrote: >>> >>>> Hi Buddhima, >>>> >>>> I am going to develop Local File Inbound/Connector. I heard that you >>>> were developed some custom inbounds. May I get some samples on custom >>>> inbound? >>>> >>>> Thanks >>>> -- >>>> >>>> *Kalyani Yogeswaranathan* >>>> >>>> *Associate software engineer* >>>> *WSO2 Inc.* >>>> >>>> *Mobile: 0776390284 <0776390284>* >>>> >>> >>> >>> >>> -- >>> Buddhima Wijeweera >>> Software Engineer; WSO2 Inc.; http://wso2.com , >>> >>> Mobile: +94 71 427 9966 >>> Email: [email protected] >>> Blog: https://buddhimawijeweera.wordpress.com >>> GitHub Profile: https://github.com/Buddhima >>> >> >> >> >> -- >> >> *Kalyani Yogeswaranathan* >> >> *Associate software engineer* >> *WSO2 Inc.* >> >> *Mobile: 0776390284 <0776390284>* >> > > > > -- > > *Kalyani Yogeswaranathan* > > *Associate software engineer* > *WSO2 Inc.* > > *Mobile: 0776390284 <0776390284>* > -- Buddhima Wijeweera Software Engineer; WSO2 Inc.; http://wso2.com , Mobile: +94 71 427 9966 Email: [email protected] Blog: https://buddhimawijeweera.wordpress.com GitHub Profile: https://github.com/Buddhima -- *Kalyani Yogeswaranathan* *Associate software engineer* *WSO2 Inc.* *Mobile: 0776390284*
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
