public static Object simpleProxy(final BeanContext beanContext, final Class<?>[] itfs) { if (beanContext.isLocalbean()) { return LocalBeanProxyFactory.newProxyInstance(itfs[0].getClassLoader(), new Handler(beanContext), itfs[0]); } return Proxy.newProxyInstance(itfs[0].getClassLoader(), itfs, new Handler(beanContext)); }
@Override public Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable { final BeanContext beanContext = getBeanContext(); final RpcContainer container = RpcContainer.class.cast(beanContext.getContainer()); return container.invoke(beanContext.getDeploymentID(), beanContext.getInterfaceType(method.getDeclaringClass()), method.getDeclaringClass(), method, args, null); }
public static Object simpleProxy(final BeanContext beanContext, final Class<?>[] itfs) { if (beanContext.isLocalbean()) { return LocalBeanProxyFactory.newProxyInstance(itfs[0].getClassLoader(), new Handler(beanContext), itfs[0]); } return Proxy.newProxyInstance(itfs[0].getClassLoader(), itfs, new Handler(beanContext)); }
public static Object subclassProxy(final BeanContext beanContext) { try { return LocalBeanProxyFactory.newProxyInstance(beanContext.getModuleContext().getClassLoader(), new Handler(beanContext), beanContext.getBeanClass(), IntraVmProxy.class, Serializable.class); } catch (final InternalError ie) { // try without intravmproxy which is maybe not loadable (in OSGi it can happen) return LocalBeanProxyFactory.newProxyInstance(beanContext.getModuleContext().getClassLoader(), new Handler(beanContext), beanContext.getBeanClass(), Serializable.class); } }
@Override public Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable { final BeanContext beanContext = getBeanContext(); final RpcContainer container = RpcContainer.class.cast(beanContext.getContainer()); return container.invoke(beanContext.getDeploymentID(), beanContext.getInterfaceType(method.getDeclaringClass()), method.getDeclaringClass(), method, args, null); }
public static Object proxy(final BeanContext beanContext, final Class<?>[] itfs) { if (beanContext.isLocalbean()) { return LocalBeanProxyFactory.newProxyInstance(itfs[0].getClassLoader(), new Handler(beanContext), itfs[0], IntraVmProxy.class, Serializable.class); } return Proxy.newProxyInstance(itfs[0].getClassLoader(), itfs, new Handler(beanContext)); }
public static Object proxy(final BeanContext beanContext, final Class<?>[] itfs) { if (beanContext.isLocalbean()) { return LocalBeanProxyFactory.newProxyInstance(itfs[0].getClassLoader(), new Handler(beanContext), itfs[0], IntraVmProxy.class, Serializable.class); } return Proxy.newProxyInstance(itfs[0].getClassLoader(), itfs, new Handler(beanContext)); }
public static Object subclassProxy(final BeanContext beanContext) { try { return LocalBeanProxyFactory.newProxyInstance(beanContext.getModuleContext().getClassLoader(), new Handler(beanContext), beanContext.getBeanClass(), IntraVmProxy.class, Serializable.class); } catch (final InternalError ie) { // try without intravmproxy which is maybe not loadable (in OSGi it can happen) return LocalBeanProxyFactory.newProxyInstance(beanContext.getModuleContext().getClassLoader(), new Handler(beanContext), beanContext.getBeanClass(), Serializable.class); } }