Package org.apache.tuscany.sca.core.scope

Examples of org.apache.tuscany.sca.core.scope.Scope


        if (to != null) {
            parameters = to.getReferenceParameters();
        }
        // check what sort of context is required
        if (scopeContainer != null) {
            Scope scope = scopeContainer.getScope();
            if (scope == Scope.REQUEST) {
                contextId = Thread.currentThread();
            } else if (scope == Scope.CONVERSATION && parameters != null) {
                contextId = parameters.getConversationID();
            }
View Full Code Here


        if (to != null) {
            parameters = to.getReferenceParameters();
        }
        // check what sort of context is required
        if (scopeContainer != null) {
            Scope scope = scopeContainer.getScope();
            if (scope == Scope.REQUEST) {
                contextId = Thread.currentThread();
            } else if (scope == Scope.CONVERSATION && parameters != null) {
                contextId = parameters.getConversationID();
            }
View Full Code Here

        if (javaImpl.getMaxAge() != Long.MAX_VALUE)
            maxAge = javaImpl.getMaxAge();
        if (javaImpl.getMaxIdleTime() != Long.MAX_VALUE)
            maxIdleTime = javaImpl.getMaxIdleTime();
        if (javaImpl.getJavaScope() != JavaScopeImpl.COMPOSITE)
            scope = new Scope(javaImpl.getJavaScope().getScope());
       
        return javaImpl;
    }
View Full Code Here

            processingResolvedBundle = true;
        }
       
        osgiAnnotations.processAnnotations();
       
        Scope scope = osgiAnnotations.getScope();
        if (scope.equals(Scope.SYSTEM) || scope.equals(Scope.COMPOSITE)) {
            // Nothing
        } else {

            if (runtimeComponent instanceof ScopedRuntimeComponent) {
View Full Code Here

*/
public class ScopeTestCase {

    @Test
    public void testEquals() throws Exception {
        Scope scope = new Scope("COMPOSITE");
        assertTrue(scope.equals(Scope.COMPOSITE));
    }
View Full Code Here

        assertTrue(scope.equals(Scope.COMPOSITE));
    }

    @Test
    public void testEqualsNew() throws Exception {
        Scope foo = new Scope("foo");
        Scope foo2 = new Scope("FOO");
        assertTrue(foo.equals(foo2));
    }
View Full Code Here

        assertTrue(foo.equals(foo2));
    }

    @Test
    public void testNotEquals() throws Exception {
        Scope foo = new Scope("BAR");
        Scope foo2 = new Scope("FOO");
        assertFalse(foo.equals(foo2));
    }
View Full Code Here

        assertFalse(foo.equals(foo2));
    }

    @Test
    public void testNotEqualsDifferent() throws Exception {
        Scope foo = new Scope("FOO");
        assertFalse(foo.equals(new Bar("FOO")));
    }
View Full Code Here

            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;
            } else if (scope.equals(Scope.INVALID)) {
              return null;
            }
            ScopeContainerFactory factory = scopeCache.get(scope);
            ScopeContainer container = factory.createScopeContainer(component);
            component.setScopeContainer(container);
View Full Code Here

                                                 dataBindingRegistry,
                                                 propertyValueObjectFactory,
                                                 componentContextFactory,
                                                 requestContextFactory);

            this.scope =  new Scope(implementation.getJavaScope().getScope());
            componentContextProvider.configureProperties(component.getProperties());
            handleResources(implementation, proxyService);
        } catch (Exception e) {
            throw new IllegalStateException(e);
        }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.core.scope.Scope

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.