private ProxyFactory getProxyFactory(CompositeContext compositeContext) { ExtensionPointRegistry extensionPointRegistry = compositeContext.getExtensionPointRegistry(); return ExtensibleProxyFactory.getInstance(extensionPointRegistry); }
public ExtensionPointRegistry getExtensionPointRegistry() { return getCompositeContext().getExtensionPointRegistry(); }
/** * Gets a RuntimeAssemblyFactory from the CompositeContext * @param compositeContext * @return the RuntimeAssemblyFactory */ private RuntimeAssemblyFactory getAssemblyFactory( CompositeContext compositeContext ) { ExtensionPointRegistry registry = compositeContext.getExtensionPointRegistry(); FactoryExtensionPoint modelFactories = registry.getExtensionPoint(FactoryExtensionPoint.class); return (RuntimeAssemblyFactory)modelFactories.getFactory(AssemblyFactory.class); } // end method RuntimeAssemblyFactory
/** * Gets a RuntimeAssemblyFactory from the CompositeContext * @param compositeContext * @return the RuntimeAssemblyFactory */ private RuntimeAssemblyFactory getAssemblyFactory(CompositeContext compositeContext) { ExtensionPointRegistry registry = compositeContext.getExtensionPointRegistry(); FactoryExtensionPoint modelFactories = registry.getExtensionPoint(FactoryExtensionPoint.class); return (RuntimeAssemblyFactory)modelFactories.getFactory(AssemblyFactory.class); } // end method RuntimeAssemblyFactory
private JavaInterfaceFactory getJavaInterfaceFactory(CompositeContext compositeContext) { ExtensionPointRegistry extensionPointRegistry = compositeContext.getExtensionPointRegistry(); FactoryExtensionPoint factories = extensionPointRegistry.getExtensionPoint(FactoryExtensionPoint.class); JavaInterfaceFactory javaInterfaceFactory = factories.getFactory(JavaInterfaceFactory.class); return javaInterfaceFactory; }
public void bind(CompositeContext compositeContext) { this.compositeContext = compositeContext; bind(compositeContext.getExtensionPointRegistry(), compositeContext.getEndpointRegistry()); }
public void bind(CompositeContext compositeContext) { this.compositeContext = compositeContext; bind(compositeContext.getExtensionPointRegistry(), compositeContext.getEndpointRegistry()); }
public Object getInstance() throws InstantiationException { ExtensionPointRegistry registry = epr.getCompositeContext().getExtensionPointRegistry(); ExtensibleProxyFactory proxyFactory = ExtensibleProxyFactory.getInstance(registry); return proxyFactory.createProxy(iface, 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
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); }
if( context == null && requestEndpoint != null ) context = requestEndpoint.getCompositeContext(); if( context != null ) { registry = context.getExtensionPointRegistry(); domainRegistry = getEndpointRegistry( registry ); if( domainRegistry != null ) {
registry = context.getExtensionPointRegistry();
/** * Create an Async Response Endpoint * @param msg - the Tuscany message * @param respInvoker - the AsyncResponseInvoker for the async response * @return - an Endpoint which embodies the callback address */ private Endpoint createAsyncResponseEndpoint(Message msg, AsyncResponseInvoker<String> respInvoker) { String callbackAddress = respInvoker.getResponseTargetAddress(); if( callbackAddress == null ) return null; // Get the necessary factories ExtensionPointRegistry registry = endpointReference.getCompositeContext().getExtensionPointRegistry(); FactoryExtensionPoint modelFactories = registry.getExtensionPoint(FactoryExtensionPoint.class); RuntimeAssemblyFactory assemblyFactory = (RuntimeAssemblyFactory)modelFactories.getFactory(AssemblyFactory.class); WebServiceBindingFactory webServiceBindingFactory = (WebServiceBindingFactory)modelFactories.getFactory(WebServiceBindingFactory.class); // Create the endpoint RuntimeEndpoint callbackEndpoint = (RuntimeEndpoint)assemblyFactory.createEndpoint(); // Add a binding WebServiceBinding cbBinding = webServiceBindingFactory.createWebServiceBinding(); cbBinding.setURI(callbackAddress); callbackEndpoint.setBinding(cbBinding); // Embed the response Address URI callbackEndpoint.setURI(callbackAddress); callbackEndpoint.setUnresolved(true); return callbackEndpoint; } // end method createAsyncResponseEndpoint
ExtensionPointRegistry registry = compositeContext.getExtensionPointRegistry(); FactoryExtensionPoint modelFactories = registry.getExtensionPoint(FactoryExtensionPoint.class); JavaInterfaceFactory javaInterfaceFactory =
ExtensionPointRegistry registry = compositeContext.getExtensionPointRegistry(); FactoryExtensionPoint modelFactories = registry.getExtensionPoint(FactoryExtensionPoint.class); JavaInterfaceFactory javaInterfaceFactory = (JavaInterfaceFactory)modelFactories.getFactory(JavaInterfaceFactory.class);