|
Constructor for ComponentInvocationHandler.
<font size="-1">Explanation of why delegateIF must be passed in addition to delegate : the method findDelegateMethod has to resolve the corresponding method from the delegation object. In the server-side case, the delegation object is the component implementation, and the passed method belongs to the corba operations interface of that component. CORBA interfaces are not allowed to use two methods with the same name but different parameters, and the "internal" functional interface of the component is foreseen to be derived such that method names don't change.
One might thus believe that there would be a unique correspondence between method names from the corba operations interface and from the functional interface of the component implementation; this is not necessarily the case though, because the component implementation might inherit arbitrary methods for which the Corba IDL naming restrictions don't apply. Suppose the Corba operations IF contains a method SchedBlock getSchedBlock() . Thanks to IDL conventions, there can not be any other name-overloaded method like SchedBlock getSchedBlock(String name) . However, the component implementation could contain this method, either directly or through inheritance, outside of the functional interface. This would cause an ambiguity when trying to dispatch to the correct method. To avoid this conflict, delegateIF is passed as well, so that the ComponentInvocationHandler knows which subset of methods found in delegate can be considered for method dispatching. </font> |