Examples of ImplementationProvider


Examples of org.apache.tuscany.sca.provider.ImplementationProvider

        Implementation implementation = component.getImplementation();
        if (implementation instanceof Composite) {
            start((Composite)implementation);
        } else {
            ImplementationProvider implementationProvider = runtimeComponent.getImplementationProvider();
            if (implementationProvider != null) {
                implementationProvider.start();
            }
        }

        if (component instanceof ScopedRuntimeComponent) {
            ScopedRuntimeComponent scopedRuntimeComponent = (ScopedRuntimeComponent)component;
View Full Code Here

Examples of org.apache.tuscany.sca.provider.ImplementationProvider

        }
        Implementation implementation = component.getImplementation();
        if (implementation instanceof Composite) {
            stop((Composite)implementation);
        } else {
            final ImplementationProvider implementationProvider = ((RuntimeComponent)component).getImplementationProvider();
            if (implementationProvider != null) {
                // Allow bindings to read properties. Requires PropertyPermission read in security policy.
                AccessController.doPrivileged(new PrivilegedAction<Object>() {
                    public Object run() {
                        implementationProvider.stop();
                        return null;
                      }
                });                      
            }
        }
View Full Code Here

Examples of org.apache.tuscany.sca.provider.ImplementationProvider

    public ImplementationProvider createImplementationProvider(RuntimeComponent component, WebImplementation implementation) {
        servletHost.setAttribute("org.apache.tuscany.sca.implementation.web.RuntimeComponent", component);
        servletHost.setAttribute("org.oasisopen.sca.ComponentContext", new ComponentContextProxy(component));

        ImplementationProvider impl;
        if (jsClient != null && implementation.getJSClient()) {
            impl = jsClient.createImplementationProvider(component, implementation);
        } else {
            impl = new ImplementationProvider() {
               
                public Invoker createInvoker(RuntimeComponentService arg0, Operation arg1) {
                    throw new UnsupportedOperationException("Components using implementation.web have no services");
                }
                public void start() {
View Full Code Here

Examples of org.apache.tuscany.sca.provider.ImplementationProvider

        servletHost.addServletMapping("org.osoa.sca.componentContext.js", contextServlet);
        contextServlet.setAttribute("org.osoa.sca.ComponentContext", new ComponentContextProxy(component));
        contextServlet.setAttribute("org.apache.tuscany.sca.implementation.web.RuntimeComponent", component);

        return new ImplementationProvider() {
            public Invoker createInvoker(RuntimeComponentService arg0, Operation arg1) {
                throw new UnsupportedOperationException("Components using implementation.web have no services");
            }
            public void start() {
            }
View Full Code Here

Examples of org.apache.tuscany.sca.provider.ImplementationProvider

            // Fix up all of the operation chain response paths to point back to the implementation provided
            // async response handler
            //ImplementationProvider implementationProvider = ((RuntimeComponent)getComponent()).getImplementationProvider();
          RuntimeComponentReference theReference = (RuntimeComponentReference)this.getReference();
          RuntimeComponent theComponent = theReference.getComponent();
            ImplementationProvider implementationProvider = theComponent.getImplementationProvider();
            if (implementationProvider instanceof ImplementationAsyncProvider){
                for (InvocationChain chain : getInvocationChains()){
                    InvokerAsyncResponse asyncResponseInvoker = ((ImplementationAsyncProvider)implementationProvider).createAsyncResponseInvoker(chain.getSourceOperation());
                    if (chain.getHeadInvoker() instanceof InterceptorAsync){
                        ((InterceptorAsync)chain.getHeadInvoker()).setPrevious(asyncResponseInvoker);
View Full Code Here

Examples of org.apache.tuscany.sca.provider.ImplementationProvider

    private void addImplementationProvider(RuntimeComponent component, Implementation implementation) {
        ImplementationProviderFactory providerFactory =
            (ImplementationProviderFactory)providerFactories.getProviderFactory(implementation.getClass());
        if (providerFactory != null) {
            @SuppressWarnings("unchecked")
            ImplementationProvider implementationProvider =
                providerFactory.createImplementationProvider(component, implementation);
            if (implementationProvider != null) {
                component.setImplementationProvider(implementationProvider);
            }
View Full Code Here

Examples of org.apache.tuscany.sca.provider.ImplementationProvider

            } else {
                for (PolicyProvider policyProvider : runtimeComponent.getPolicyProviders()) {
                    policyProvider.start();
                    providers.add(policyProvider);
                }
                ImplementationProvider implementationProvider = runtimeComponent.getImplementationProvider();
                if (implementationProvider != null) {
                    implementationProvider.start();
                    providers.add(implementationProvider);
                }
            }

            for (ComponentService service : component.getServices()) {
View Full Code Here

Examples of org.apache.tuscany.sca.provider.ImplementationProvider

        }
        Implementation implementation = component.getImplementation();
        if (implementation instanceof Composite) {
            stop(compositeContext, (Composite)implementation);
        } else {
            final ImplementationProvider implementationProvider = ((RuntimeComponent)component).getImplementationProvider();
            if (implementationProvider != null) {
                try {
                    // Allow bindings to read properties. Requires PropertyPermission read in security policy.
                    AccessController.doPrivileged(new PrivilegedAction<Object>() {
                        public Object run() {
                            implementationProvider.stop();
                            return null;
                          }
                    });
                } catch (Throwable ex){
                    Monitor.error(monitor, this, "core-messages", "StopException", ex);
View Full Code Here

Examples of org.apache.tuscany.sca.provider.ImplementationProvider

        }
        ScopedRuntimeComponent component = (ScopedRuntimeComponent)runtimeComponent;
        if (component.getScopeContainer() != null) {
            return component.getScopeContainer();
        }
        ImplementationProvider implementationProvider = component.getImplementationProvider();
        if (implementationProvider instanceof ScopedImplementationProvider) {
            ScopedImplementationProvider provider = (ScopedImplementationProvider)implementationProvider;
            Scope scope = provider.getScope();
            if (scope == null) {
                scope = Scope.STATELESS;
View Full Code Here

Examples of org.apache.tuscany.sca.provider.ImplementationProvider

                    clientServlet.addService((RuntimeEndpointReference)epr);
                }
            }
        }

        return new ImplementationProvider() {
            public Invoker createInvoker(RuntimeComponentService arg0, Operation arg1) {
                return null;
            }
            public void start() {
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.