Package org.apache.tuscany.sca.context

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


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

            EndpointFinder endpointFinder = RuntimeUtils.getEndpointFinder(extensionsRegistry);
            Endpoint endpoint = endpointFinder.findEndpoint(domainRegistry, serviceName);
            
            if (serviceInterface == null) {
View Full Code Here


            DomainRegistry domainRegistry =
                domainRegistryFactory.getEndpointRegistry(configuration.getDomainRegistryURI(),
                                                          configuration.getDomainURI());

            this.compositeContext =
                new CompositeContext(nodeFactory.registry, domainRegistry, domainComposite,
                                     configuration.getDomainURI(), configuration.getURI(), nodeFactory
                                         .getDeployer().getSystemDefinitions());
            // Pass down the context attributes
            compositeContext.getAttributes().putAll(configuration.getAttributes());
           
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, domainRegistry, null, null, null,
                                 deployer.getSystemDefinitions());

        if (serviceInterface == null) {
            try {
                serviceInterface = (Class<T>)findInterface(endpoint, domainRegistry);
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

            //
            // I've had a go at making the code do that below. However there is some question
            // about what the appliesTo field means and it's hard to get here from the
            // binder so until we sort out the appliesTo question this code isn't used
                      
            CompositeContext compositeContext = ((RuntimeComponent)epr.getComponent()).getComponentContext().getCompositeContext();
            Composite domainComposite = compositeContext.getDomainComposite();
            Definitions systemDefinitions = compositeContext.getSystemDefinitions();
           
            if (systemDefinitions == null ||
                (systemDefinitions.getPolicySets().isEmpty() &&
                 systemDefinitions.getExternalAttachments().isEmpty()) ) {
                return;
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 EndpointRegistry getEndpointRegistry(String uri) {
    ExtensionPointRegistry registry   = null;
    EndpointRegistry endpointRegistry = null;
   
    CompositeContext context = CompositeContext.getCurrentCompositeContext();
    if( context == null && requestEndpoint != null ) context = requestEndpoint.getCompositeContext();
    if( context != null ) {
      registry = context.getExtensionPointRegistry();
      endpointRegistry = getEndpointRegistry( registry );
      if( endpointRegistry != null ) {
        this.registry = registry;
        return endpointRegistry;
      } // end if
View Full Code Here

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

    public void bind(ExtensionPointRegistry registry, EndpointRegistry endpointRegistry) {
        if (compositeContext == null) {
            compositeContext = new CompositeContext(registry, endpointRegistry);
        }
        this.registry = registry;
        this.endpointRegistry = endpointRegistry;
        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

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.