Package org.apache.tuscany.sca.context

Examples of org.apache.tuscany.sca.context.CompositeContext


//        } finally {
//            monitorFactory.setContextMonitor(tcm);
//        }
       
        compositeContext = new CompositeContext(extensionPointRegistry,
                                                endpointRegistry,
                                                domainComposite,
                                                null, // nothing appears to use the domain name in CompositeContext
                                                null, // don't need node uri
                                                deployer.getSystemDefinitions());
View Full Code Here


        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, endpointRegistry, null, null, null,
                                 deployer.getSystemDefinitions());

        RuntimeEndpointReference epr;
        try {
            epr =
View Full Code Here

                    contributions = nodeFactory.loadContributions(configuration, context);
                }
                domainComposite = nodeFactory.configureNode(configuration, contributions, context);

                this.compositeContext =
                    new CompositeContext(nodeFactory.registry,
                                         endpointRegistry,
                                         domainComposite,
                                         configuration.getDomainURI(),
                                         configuration.getURI(),
                                         nodeFactory.getDeployer().getSystemDefinitions());
View Full Code Here

    this.responseTargetAddress = responseTargetAddress;
    this.relatesToMsgID = relatesToMsgID;
    this.operationName = operationName;
    this.messageFactory = messageFactory;
   
    CompositeContext context = null;
    if(requestEndpoint != null ) {
      endpointURI = requestEndpoint.getURI();
      context = requestEndpoint.getCompositeContext();
    } // end if
    if(responseEndpointReference != null ) {
      endpointReferenceURI = responseEndpointReference.getURI();
      context = responseEndpointReference.getCompositeContext();
    }
   
    if( context != null ) {
      domainURI = context.getDomainURI();
      registry = context.getExtensionPointRegistry();
    } // end if
   
        if ((requestEndpoint.getBindingProvider() instanceof EndpointAsyncProvider) &&
                (((EndpointAsyncProvider)requestEndpoint.getBindingProvider()).supportsNativeAsync())){
          isNativeAsync = true;
View Full Code Here

   */
  private DomainRegistry getEndpointRegistry(String uri) {
    ExtensionPointRegistry registry   = null;
    DomainRegistry domainRegistry = null;
   
    CompositeContext context = CompositeContext.getCurrentCompositeContext();
    if( context == null && requestEndpoint != null ) context = requestEndpoint.getCompositeContext();
    if( context != null ) {
      registry = context.getExtensionPointRegistry();
      domainRegistry = getEndpointRegistry( registry );
      if( domainRegistry != null ) {
        this.registry = registry;
        return domainRegistry;
      } // end if
View Full Code Here

        bind(compositeContext.getExtensionPointRegistry(), compositeContext.getEndpointRegistry());
    }

    public void bind(ExtensionPointRegistry registry, DomainRegistry domainRegistry) {
        if (compositeContext == null) {
            compositeContext = new CompositeContext(registry, domainRegistry);
        }

        // if interfaceContractMapper is already initialized then all the rest will be too
        if (interfaceContractMapper != null) {
            return;
View Full Code Here

     * Creates the Endpoint object for the async callback
     * @param endpoint - the endpoint which has the async server operations
     * @return the EndpointReference object representing the callback
     */
    private RuntimeEndpointReference createAsyncEPR( RuntimeEndpoint endpoint ){
      CompositeContext compositeContext = endpoint.getCompositeContext();
      RuntimeAssemblyFactory assemblyFactory = getAssemblyFactory( compositeContext );
        RuntimeEndpointReference epr = (RuntimeEndpointReference)assemblyFactory.createEndpointReference();
        epr.bind( compositeContext );
       
        // Create pseudo-component
        epr.setComponent(component);
       
        // Create pseudo-reference
        ComponentReference reference = assemblyFactory.createComponentReference();
        ExtensionPointRegistry registry = compositeContext.getExtensionPointRegistry();
        FactoryExtensionPoint modelFactories = registry.getExtensionPoint(FactoryExtensionPoint.class);
        JavaInterfaceFactory javaInterfaceFactory = (JavaInterfaceFactory)modelFactories.getFactory(JavaInterfaceFactory.class);
        JavaInterfaceContract interfaceContract = javaInterfaceFactory.createJavaInterfaceContract();
        try {
      interfaceContract.setInterface(javaInterfaceFactory.createJavaInterface(AsyncResponseService.class));
View Full Code Here

        bind(compositeContext.getExtensionPointRegistry(), compositeContext.getEndpointRegistry());
    }

    public void bind(ExtensionPointRegistry registry, DomainRegistry domainRegistry) {
        if (compositeContext == null) {
            compositeContext = new CompositeContext(registry, domainRegistry);
        }
        this.registry = registry;
        this.domainRegistry = domainRegistry;
        UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
        this.eprBinder = utilities.getUtility(EndpointReferenceBinder.class);
View Full Code Here

       
        return interfaceContract.getNormalizedWSDLContract();     
    }  
   
    public void createAsyncCallbackEndpoint(){
        CompositeContext compositeContext = getCompositeContext();
        FactoryExtensionPoint modelFactories = registry.getExtensionPoint(FactoryExtensionPoint.class);
        RuntimeAssemblyFactory assemblyFactory = (RuntimeAssemblyFactory)modelFactories.getFactory(AssemblyFactory.class);
       
        RuntimeEndpoint endpoint = (RuntimeEndpoint)assemblyFactory.createEndpoint();
        endpoint.bind(compositeContext);
View Full Code Here

            FactoryExtensionPoint factories = extensionsRegistry.getExtensionPoint(FactoryExtensionPoint.class);
            AssemblyFactory assemblyFactory = factories.getFactory(AssemblyFactory.class);
            JavaInterfaceFactory javaInterfaceFactory = factories.getFactory(JavaInterfaceFactory.class);
            ProxyFactory proxyFactory = new ExtensibleProxyFactory(extensionsRegistry.getExtensionPoint(ProxyFactoryExtensionPoint.class));

            CompositeContext compositeContext = new CompositeContext(extensionsRegistry, domainRegistry, null, domainURI, null, null);

            List<Endpoint> eps = domainRegistry.findEndpoint(serviceName);
            if (eps == null || eps.size() < 1) {
                throw new NoSuchServiceException(serviceName);
            }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.context.CompositeContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.