private ProxyFactory getProxyFactory(CompositeContext compositeContext) { ExtensionPointRegistry extensionPointRegistry = compositeContext.getExtensionPointRegistry(); return ExtensibleProxyFactory.getInstance(extensionPointRegistry); }
public Object getInstance() throws InstantiationException { ExtensionPointRegistry registry = epr.getCompositeContext().getExtensionPointRegistry(); ExtensibleProxyFactory proxyFactory = ExtensibleProxyFactory.getInstance(registry); return proxyFactory.createProxy(iface, epr); } });
private static <T> T getRemoteProxy(Class<T> serviceInterface, Endpoint endpoint, DomainRegistry domainRegistry, ExtensionPointRegistry extensionPointRegistry, Deployer deployer) throws NoSuchServiceException { FactoryExtensionPoint factories = extensionPointRegistry.getExtensionPoint(FactoryExtensionPoint.class); AssemblyFactory assemblyFactory = factories.getFactory(AssemblyFactory.class); JavaInterfaceFactory javaInterfaceFactory = factories.getFactory(JavaInterfaceFactory.class); ProxyFactory proxyFactory = new ExtensibleProxyFactory(extensionPointRegistry.getExtensionPoint(ProxyFactoryExtensionPoint.class)); CompositeContext compositeContext = new CompositeContext(extensionPointRegistry, domainRegistry, null, null, null, deployer.getSystemDefinitions()); if (serviceInterface == null) { try { serviceInterface = (Class<T>)findInterface(endpoint, domainRegistry); } catch (Exception e) { throw new RuntimeException(e); } } RuntimeEndpointReference epr; try { epr = createEndpointReference(javaInterfaceFactory, compositeContext, assemblyFactory, endpoint, serviceInterface); } catch (Exception e) { throw new ServiceRuntimeException(e); } return proxyFactory.createProxy(serviceInterface, epr); }
AssemblyFactory assemblyFactory = factories.getFactory(AssemblyFactory.class); JavaInterfaceFactory javaInterfaceFactory = factories.getFactory(JavaInterfaceFactory.class); ProxyFactory proxyFactory = new ExtensibleProxyFactory(extensionsRegistry.getExtensionPoint(ProxyFactoryExtensionPoint.class));
/** * Simple constructor * */ public SpringImplementationProviderFactory(ExtensionPointRegistry registry) { super(); UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class); contextAccessor = utilities.getUtility(SpringApplicationContextAccessor.class); proxyFactory = ExtensibleProxyFactory.getInstance(registry); propertyFactory = utilities.getUtility(PropertyValueFactory.class); }
private static <T> T getRemoteProxy(Class<T> serviceInterface, Endpoint endpoint, DomainRegistry domainRegistry, ExtensionPointRegistry extensionPointRegistry, Deployer deployer) throws NoSuchServiceException { FactoryExtensionPoint factories = extensionPointRegistry.getExtensionPoint(FactoryExtensionPoint.class); AssemblyFactory assemblyFactory = factories.getFactory(AssemblyFactory.class); JavaInterfaceFactory javaInterfaceFactory = factories.getFactory(JavaInterfaceFactory.class); ProxyFactory proxyFactory = new ExtensibleProxyFactory(extensionPointRegistry.getExtensionPoint(ProxyFactoryExtensionPoint.class)); CompositeContext compositeContext = new CompositeContext(extensionPointRegistry, domainRegistry, null, null, null, deployer.getSystemDefinitions()); if (serviceInterface == null) { try { serviceInterface = (Class<T>)findInterface(endpoint, domainRegistry); } catch (Exception e) { throw new RuntimeException(e); } } RuntimeEndpointReference epr; try { epr = createEndpointReference(javaInterfaceFactory, compositeContext, assemblyFactory, endpoint, serviceInterface); } catch (Exception e) { throw new ServiceRuntimeException(e); } return proxyFactory.createProxy(serviceInterface, epr); }
/** * Creates a service reference for the async callback, based on information contained in the supplied message * @param msg - the incoming message * @return - a CallBackServiceReference */ @SuppressWarnings("unchecked") private ServiceReference<AsyncResponseHandler<?>> getAsyncCallbackRef( Message msg ) { RuntimeEndpointReference callbackEPR = (RuntimeEndpointReference) msg.getHeaders().get(Constants.ASYNC_CALLBACK); if( callbackEPR == null ) return null; CompositeContext compositeContext = callbackEPR.getCompositeContext(); registry = compositeContext.getExtensionPointRegistry(); ProxyFactory proxyFactory = ExtensibleProxyFactory.getInstance(registry); msgFactory = getMessageFactory(); List<EndpointReference> eprList = new ArrayList<EndpointReference>(); eprList.add(callbackEPR); ObjectFactory<?> factory = new CallbackReferenceObjectFactory(AsyncResponseHandler.class, proxyFactory, eprList); return (ServiceReference<AsyncResponseHandler<?>>) factory.getInstance(); } // end method getAsyncCallbackEPR
AssemblyFactory assemblyFactory = factories.getFactory(AssemblyFactory.class); JavaInterfaceFactory javaInterfaceFactory = factories.getFactory(JavaInterfaceFactory.class); ProxyFactory proxyFactory = new ExtensibleProxyFactory(extensionsRegistry.getExtensionPoint(ProxyFactoryExtensionPoint.class));
requestMediaType, responseMediaType); ProxyFactory proxyFactory = ExtensibleProxyFactory.getInstance(extensionPoints); Object proxy = proxyFactory.createProxy(interfaze, endpoint); RootResourceClassGenerator.injectProxy(cls, proxy);
proxyFactory = ExtensibleProxyFactory.getInstance(registry);
proxyFactory = ExtensibleProxyFactory.getInstance(registry);
protected void bind(CompositeContext context) { this.compositeContext = context; this.registry = compositeContext.getExtensionPointRegistry(); this.modelFactories = registry.getExtensionPoint(FactoryExtensionPoint.class); this.assemblyFactory = (RuntimeAssemblyFactory)modelFactories.getFactory(AssemblyFactory.class); this.xmlInputFactory = modelFactories.getFactory(XMLInputFactory.class); this.xmlOutputFactory = modelFactories.getFactory(XMLOutputFactory.class); this.staxProcessors = registry.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class); this.staxProcessor = staxProcessors.getProcessor(EndpointReference.class); this.builders = registry.getExtensionPoint(BuilderExtensionPoint.class); this.proxyFactory = ExtensibleProxyFactory.getInstance(registry); }
public DefaultComponentContextFactory(ExtensionPointRegistry registry) { this.registry = registry; FactoryExtensionPoint factories = registry.getExtensionPoint(FactoryExtensionPoint.class); UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class); this.assemblyFactory = factories.getFactory(AssemblyFactory.class); this.javaInterfaceFactory = factories.getFactory(JavaInterfaceFactory.class); this.compositeActivator = utilities.getUtility(CompositeActivator.class); this.requestContextFactory = registry.getExtensionPoint(ContextFactoryExtensionPoint.class).getFactory(RequestContextFactory.class); this.propertyFactory = factories.getFactory(PropertyValueFactory.class); this.eprBinder = utilities.getUtility(EndpointReferenceBinder.class); this.proxyFactory = ExtensibleProxyFactory.getInstance(registry); }
public JavaImplementationProviderFactory(ExtensionPointRegistry registry) { FactoryExtensionPoint factories = registry.getExtensionPoint(FactoryExtensionPoint.class); MessageFactory messageFactory = factories.getFactory(MessageFactory.class); UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class); InterfaceContractMapper interfaceContractMapper = utilities.getUtility(InterfaceContractMapper.class); ProxyFactoryExtensionPoint proxyFactories = registry.getExtensionPoint(ProxyFactoryExtensionPoint.class); try { proxyFactories.setClassProxyFactory(new CglibProxyFactory(messageFactory, interfaceContractMapper)); } catch (NoClassDefFoundError e) { logger.log(Level.WARNING, "Class-based proxy is not supported", e); } databindings = registry.getExtensionPoint(DataBindingExtensionPoint.class); propertyValueFactory = factories.getFactory(PropertyValueFactory.class); ContextFactoryExtensionPoint contextFactories = registry.getExtensionPoint(ContextFactoryExtensionPoint.class); componentContextFactory = contextFactories.getFactory(ComponentContextFactory.class); requestContextFactory = contextFactories.getFactory(RequestContextFactory.class); proxyFactory = ExtensibleProxyFactory.getInstance(registry); }