On Sat, 9 Nov 2002 03:30, Peter Royal wrote:
> On Friday, November 8, 2002, at 11:08  AM, Peter Donald wrote:
> >> Could we separate that into two pieces? A ComponentFactory and a
> >> ComponentProxyGenerator?
> >
> > Simple enough. But do you mind if it is still ComponentFactory that
> > calls
> > ComponentProxyGenerator and olny returns proxied instances?
>
> That works, but I'd like to be able to pass in an array of interfaces
> to the ComponentFactory then to tell the ComponentProxyGenerator what
> to proxy for.

Where do I get this array of interefaces from?

> I was actually thinking of a layered approach in the opposite
> direction. The CompoentFactory is really just an ObjectFactory. Why not
> have the ComponentProxyGenerator just be another ObjectFactory that
> takes another ObjectFactory and proxies the objects from the other
> factory? So usage might be like:
>
> ComponentFactory cf = new ComponentFactory(...);
> ComponentProxyGenerator cpg = new ComponentProxyGenerator( cf, new
> Class[] { ... } );
>
> cpg.newInstance();
>
> One could then use the ProxyGenerator wherever ObjectFactory's were
> used...

That works aswell. If we want to be completely tight about it we could have a

DefaultComponentFactory
ProxyComponentFactory
ProxyGenerator

and the ProxyComponentFactory would delegate to DefaultComponentFactory and 
use the ProxyGenerator

-- 
Cheers,

Peter Donald
*------------------------------------------------------*
| "Religion is what the common people see as true, the |
| wise people see as false, and the rulers see as      |
| useful" --Seneca                                     |
*------------------------------------------------------*


--
To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@;jakarta.apache.org>

Reply via email to