The design pattern Mediator described in
[login to view URL]
One XML is created to describes how many Colleague it should be. In this example it should be at least 4.
The Colleague is just a simple FileSystemWatcher that
start listening for files at a directory (one for each Colleague).
After creation of a file Sends the filedata to the Mediator
The mediator starts all the 4 Colleague by using the values in the XML.
Each Colleague in the XML has a name, a directory to create files in, a directory to red files from.
When the Colleague is started the mediator waits for response from the Colleague supervise of directory. When a File is created the Colleague tells the Mediator that a file with a content is created
When the mediator get data from the Colleague thru receivedData the mediator looks in the data and uses sendData to the Colleague with the name that is in the received data. The Files created for the Colleague to Supervise and send to the mediator contains ALFA,BRAVO,CHARLIE,DELTA and that correlate to the names in the Config XML that created the Colleague.
## Deliverables
This project is just a simple example of a design that will be used in a bigger project. The use of FileSystemWatcher is just a method of quickly get a message flow.
Alot of the code is done in the link provided in the short description. The trick is to start variable number of colleagues from data in an XML
The code must be don en Visual Studio 2005