Examples of ScopeContext


Examples of javax.faces.event.ScopeContext

                return;
            }
        }
        else if (event instanceof PreDestroyCustomScopeEvent)
        {
            ScopeContext scopeContext = ((PreDestroyCustomScopeEvent) event).getContext();
            scope = scopeContext.getScope();
        }
        else
        {
            // wrong event
            return;
View Full Code Here

Examples of javax.faces.event.ScopeContext

                return;
            }
        }
        else if (event instanceof PreDestroyCustomScopeEvent)
        {
            ScopeContext scopeContext = ((PreDestroyCustomScopeEvent) event).getContext();
            scope = scopeContext.getScope();
        }
        else
        {
            // wrong event
            return;
View Full Code Here

Examples of javax.faces.event.ScopeContext

                return;
            }
        }
        else if (event instanceof PreDestroyCustomScopeEvent)
        {
            ScopeContext scopeContext = ((PreDestroyCustomScopeEvent) event).getContext();
            scope = scopeContext.getScope();
        }
        else
        {
            // wrong event
            return;
View Full Code Here

Examples of javax.faces.event.ScopeContext

                return;
            }
        }
        else if (event instanceof PreDestroyCustomScopeEvent)
        {
            ScopeContext scopeContext = ((PreDestroyCustomScopeEvent) event).getContext();
            scope = scopeContext.getScope();
        }
        else
        {
            // wrong event
            return;
View Full Code Here

Examples of javax.faces.event.ScopeContext

                return;
            }
        }
        else if (event instanceof PreDestroyCustomScopeEvent)
        {
            ScopeContext scopeContext = ((PreDestroyCustomScopeEvent) event).getContext();
            scope = scopeContext.getScope();
        }
        else
        {
            // wrong event
            return;
View Full Code Here

Examples of org.apache.tuscany.core.context.ScopeContext

    }

    public void registerJavaObject(String componentName, Class<?> service, Object instance) throws ConfigurationException {
        SystemObjectContextFactory configuration = new SystemObjectContextFactory(componentName, instance);
        registerConfiguration(configuration);
        ScopeContext scope = scopeContexts.get(configuration.getScope());
        registerAutowireInternal(service, componentName, scope);
    }
View Full Code Here

Examples of org.apache.tuscany.core.context.ScopeContext

        cci.start();

        Map<String, Context> ics = new HashMap<String, Context>();
        ics.put(entryPointName, new MockEntryPointContext(instance));

        ScopeContext sc = new MockScopeContext(ics);
        sc.start();

        Map<String, ScopeContext> scopeIndex = cci.getScopeIndex();
        scopeIndex.put(entryPointName, sc);

        return cci;
View Full Code Here

Examples of org.apache.tuscany.core.context.ScopeContext

    public SystemScopeStrategy() {
    }

    public Map<Scope, ScopeContext> getScopeContexts(EventContext eventContext) {
        ScopeContext aggregrateScope = new CompositeScopeContext(eventContext);
        ScopeContext moduleScoper = new ModuleScopeContext(eventContext);
        ScopeContext statelessScope = new StatelessScopeContext(eventContext);
        Map<Scope, ScopeContext> scopes = new HashMap<Scope, ScopeContext>();
        scopes.put(Scope.AGGREGATE, aggregrateScope);
        scopes.put(Scope.MODULE, moduleScoper);
        scopes.put(Scope.INSTANCE, statelessScope);
        return scopes;
View Full Code Here

Examples of org.apache.tuscany.core.context.ScopeContext

                    registerAutowire(es);
                }
                for (Map.Entry<Scope, List<ContextFactory<Context>>> entries : configurationsByScope.entrySet())
                {
                    // register configurations with scope contexts
                    ScopeContext scope = scopeContexts.get(entries.getKey());
                    scope.registerFactories(entries.getValue());
                }
                initializeWireFactories();
                for (ScopeContext scope : scopeContexts.values()) {
                    // register scope contexts as a listeners for events in the composite context
                    addListener(scope);
                    scope.start();
                }
                lifecycleState = RUNNING;
            } catch (WireFactoryInitException e) {
                lifecycleState = ERROR;
                ContextInitException cie = new ContextInitException(e);
View Full Code Here

Examples of org.apache.tuscany.core.context.ScopeContext

        if (lifecycleState == RUNNING) {
            if (scopeIndex.get(factory.getName()) != null) {
                throw new DuplicateNameException(factory.getName());
            }
            try {
                ScopeContext scope = scopeContexts.get(factory.getScope());
                if (scope == null) {
                    ConfigurationException e = new MissingScopeException("Component has an unknown scope");
                    e.addContextName(factory.getName());
                    e.addContextName(getName());
                    throw e;
                }
                scope.registerFactory(factory);
                scopeIndex.put(factory.getName(), scope);
            } catch (TuscanyRuntimeException e) {
                e.addContextName(getName());
                throw e;
            }
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.