-
1. Re: how do the proxy classes work - ie Block/BlockSupport
julien1 Feb 11, 2004 11:26 PM (in response to jae77)this is a dynamic proxy that wraps the block support, the handler goes through the MBean server to call the actual block.
for instance : proxy.setSide(0) will do :
proxy.setSide(0)
-> invocationHandler.invoke(m, new Object[]{new Integer(0)}
-> server.setAttribute("Side", new Integer(0));
-> block.setSide(0)
you would say me, what the interest of that ? instead of giving the actual reference of the block ?
the interest is that is the you undeploy the block, it does it nicely because the proxy client does not have a reference on the class. -
2. Re: how do the proxy classes work - ie Block/BlockSupport
julien1 Feb 11, 2004 11:29 PM (in response to jae77)BTW, this would not prevent BlockSupport from implementing Block and we could do that indeed from the OO design standpoint, but it is not important.
-
3. Re: how do the proxy classes work - ie Block/BlockSupport
jae77 Feb 12, 2004 9:14 AM (in response to jae77)cool - thanks for that explination. i definately see the value in using the dynamic proxy. i just don't have a lot of experience using them, hence my question.
it may be better in the long run to have the Support modules implement the interfaces b/c it would help clear up any confusion on where the implementation comes from, and also guarentee that both classes are kept in sync for new method additions.