Whenever an object is passed from one netlet to another, or from a node to a netlet, or vice versa, it goes via the mediator.
The mediator's job is to ensure Jtrix components never share code, so the object isn't actually passed through. Instead the mediator creates a proxy of the object and passes that.
The problem is, it isn't always easy for the mediator to work out which bits of the object are important in the proxying, and which bits aren't. It has a real problem when we have to return a facet. So when we return out IHelloFacet we have to explicitly say ``This is the object and this is the interface name'' (the two parameters of the FacetHandle constructor).
But the rest of the time we never have to worry about it. For example, the return value of getMessage() is a String, and we don't need to wrap that, even though it goes through the mediator (just like all things from one netlet to another pass through the mediator).
So that's the rule: when returning a facet, wrap it in a FacetHandle.
Nik Silver 2002-03-09