InterfaceBinding interfaceBinding = (InterfaceBinding) it.next();
String bindingName = ClassUtils.getSimpleName(interfaceBinding.getInterface());
if (proxies.containsKey(bindingName))
{
Object proxy = proxies.get(bindingName);
BindingInvocationHandler handler = (BindingInvocationHandler) Proxy.getInvocationHandler(proxy);
handler.addRouterForInterface(interfaceBinding);
}
else
{
Object proxy = Proxy.newProxyInstance(muleContext.getExecutionClassLoader(),
new Class[]{interfaceBinding.getInterface()},
new BindingInvocationHandler(interfaceBinding));
proxies.put(bindingName, proxy);
}
}
}
}