<property
name="connector"
value="com.spintop.mule.providers.email.PopBadAddressReceiver"/>
Take a closer look. ;)
-h
---------------------------------------------------------------------
To unsubscribe from this list please visit:
Hi All,
I am a little confused about how to continue with this issue.
Requirements:
1> Mule monitoring files for some file directory
2> When there is new file in the monitored directory, it need to read content of the file and create new file with different content
3> Output to different new directory for new file
, public class MyComponent implements Initialisable {
Logger logger = Logger.getLogger(MyComponent.class.getName());
Map map ;
public void initialise() {
map = new HashMap();
logger.info("************************Do Initialise**************************");
}
public void dobusiness(String message) throws UMOException {
logger.info("============= Doing =========== Business Logic =========== ");
}
}
public class MyFileReceiver extends PollingMessageReceiver
{
………
public synchronized void processFile(final File sourceFile) throws UMOException
{
logger.info("doing process file !!!..........!!!");
}
……
}
Please help !!!!!!!!!!!!!!!!!!
From: Tony Lu [mailto:tony...@gmail.com]
Sent: 01 February 2007 09:09
To: us...@mule.codehaus.org
Subject: [mule-user] Need help for file connector customization ......
This message has been checked for all email viruses by MessageLabs.
One purpose is to monitor a folder and all its subfolders.
Now I know where and how to create new message receiver about it.
But it's not only for file copy and paste.
I need to read content of source file and create new file to new directory.
The business logic is complicated and it needs some other public variables
from UMOComponent.
I am not sure if it's OK to compose business logic in new message receiver
class.
And don't know how to get public variables in UMOComponent.
-----邮件原件-----
发件人: kenneth.w...@pandora.be [mailto:kenneth.w...@telenet.be]
发送时间: 2007年2月1日 18:08
收件人: us...@mule.codehaus.org
主题: Re: [mule-user] Need help for file connector customization ......
>I need to read content of source file and create new file to new directory.
>The business logic is complicated and it needs some other public variables
>from UMOComponent.
>
>I am not sure if it's OK to compose business logic in new message receiver
>class.
It's not ok to execute business logic in the FileMessageReceiver. The connectors should only be used to connect your Mule to external system. That's their sole purpose. Please read the Architecture Guide on this matter.
I think you want to read files from a folder and its subfolders and then maybe aggregate this. If this is what you want, please read: http://mule.mulesource.org/wiki/display/MULE/Message+Routers#MessageRouters-Aggregator
The aggregating process is something you will have to write, but its not that difficult to do.