You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Leif Mortenson <le...@silveregg.co.jp> on 2002/02/19 02:55:25 UTC

Handling foreign non-Component objects using a proxy Component.

Would it be possible to set something up like the ComponentSelector
which could be used to handle foreign objects? I do not have all of the
details worked out, but it seems like you could create a Component which
had the sole purpose of acting as a proxy for a foreign object which
does not implement Component.

You could then have code like the following:

---
ForeignComponentSelector fc =
(ForeignComponentSelector)m_manager.lookup(MyObj.ROLE + "ForeignSelector");
MyObj obj = (MyObj)fc.select(MyObjName);

.. Make use of obj as needed ..

fc.release(obj);
m_manager.release(fc);
---

It seems like this would allow you a way to add in support for
non-Component objects without having to change the way Avalon as a whole
works.

Opinions?

Leif


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>