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 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 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); } }
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); } }