How to use factory components with DS [message #100353] |
Thu, 25 October 2007 20:40 |
Eclipse User |
|
|
|
Originally posted by: beryilmaREMOVETHIS.mathworks.com
Is there an example of using factory components in DS implementing the
ComponentFactory interface.
Basically, my application can use multiple components of the same class.
Sort of equivalent to the following code:
MyComponent comp1 = new MyComponent();
MyComponent comp2 = new MyComponent();
MyApplication appl = new MyApplication();
appl.addComponent(comp1);
appl.addComponent(comp2);
However, MyComponent class provides a service and it would be instantiated
by a ComponentFactory. And MyApplication class needs to get its "bind"
method called anytime a new service is added.
|
|
|
Powered by
FUDForum. Page generated in 0.03413 seconds