Examples of LifecycleManagersRegistry


Examples of org.apache.wink.common.internal.lifecycle.LifecycleManagersRegistry

     * use the same instance of the ApplicationValidator.
     */
    protected void initRegistries() {
        InjectableFactory.setInstance(new ServerInjectableFactory());
        if (ofFactoryRegistry == null) {
            ofFactoryRegistry = new LifecycleManagersRegistry();
            ofFactoryRegistry.addFactoryFactory(new ScopeLifecycleManager<Object>());
        }
        ApplicationValidator applicationValidator = new ApplicationValidator();
        providersRegistry = new ProvidersRegistry(ofFactoryRegistry, applicationValidator);
        resourceRegistry = new ResourceRegistry(ofFactoryRegistry, applicationValidator);
View Full Code Here

Examples of org.apache.wink.common.internal.lifecycle.LifecycleManagersRegistry

        return resource(URI.create(uri));
    }

    private void initProvidersRegistry() {
        // setup OFFactoryRegistry to support default and scope
        LifecycleManagersRegistry ofFactoryRegistry = new LifecycleManagersRegistry();
        ofFactoryRegistry.addFactoryFactory(new ScopeLifecycleManager<Object>());
        providersRegistry = new ProvidersRegistry(ofFactoryRegistry, new ApplicationValidator());

        // process all applications
        for (Application app : config.getApplications()) {
            processApplication(app);
View Full Code Here

Examples of org.apache.wink.common.internal.lifecycle.LifecycleManagersRegistry

                if (runtimeContext != null) {
                    providers = runtimeContext.getProviders();
                }

                if (providers == null) {
                    LifecycleManagersRegistry ofFactoryRegistry = new LifecycleManagersRegistry();
                    ofFactoryRegistry.addFactoryFactory(new ScopeLifecycleManager<Object>());
                    ProvidersRegistry providersRegistry =
                        new ProvidersRegistry(ofFactoryRegistry, new ApplicationValidator());

                    final Set<Class<?>> classes = new ApplicationFileLoader(true).getClasses();
View Full Code Here

Examples of org.apache.wink.common.internal.lifecycle.LifecycleManagersRegistry

     * Thus, we need to ensure the providersCache continues to be instantiated with ConcurrentHashMap.
     */
    public void testProtectionModel() throws Exception {

        // I need the instantiated object providersCache in the abstract private nested class MediaTypeMap, so here we go!
        ProvidersRegistry providersRegistry = new ProvidersRegistry(new LifecycleManagersRegistry(), new ApplicationValidator());
        Field field = providersRegistry.getClass().getDeclaredField("messageBodyReaders");
        field.setAccessible(true);
        Object messageBodyReaders = field.get(providersRegistry);
        System.out.println(messageBodyReaders.getClass().getSuperclass().getName());
        Field field2 = messageBodyReaders.getClass().getSuperclass().getDeclaredField("providersCache");
View Full Code Here

Examples of org.apache.wink.common.internal.lifecycle.LifecycleManagersRegistry

     * use the same instance of the ApplicationValidator.
     */
    protected void initRegistries() {
        InjectableFactory.setInstance(new ServerInjectableFactory());
        if (ofFactoryRegistry == null) {
            ofFactoryRegistry = new LifecycleManagersRegistry();
            ofFactoryRegistry.addFactoryFactory(new ScopeLifecycleManager<Object>());
        }
        ApplicationValidator applicationValidator = new ApplicationValidator();
        providersRegistry = new ProvidersRegistry(ofFactoryRegistry, applicationValidator);
        resourceRegistry = new ResourceRegistry(ofFactoryRegistry, applicationValidator);
View Full Code Here

Examples of org.apache.wink.common.internal.lifecycle.LifecycleManagersRegistry

        return resource(URI.create(uri));
    }

    private void initProvidersRegistry() {
        // setup OFFactoryRegistry to support default and scope
        LifecycleManagersRegistry ofFactoryRegistry = new LifecycleManagersRegistry();
        ofFactoryRegistry.addFactoryFactory(new ScopeLifecycleManager<Object>());
        providersRegistry = new ProvidersRegistry(ofFactoryRegistry, new ApplicationValidator());

        // process all applications
        for (Application app : config.getApplications()) {
            processApplication(app);
View Full Code Here

Examples of org.apache.wink.common.internal.lifecycle.LifecycleManagersRegistry

                if (runtimeContext != null) {
                    providers = runtimeContext.getProviders();
                }

                if (providers == null) {
                    LifecycleManagersRegistry ofFactoryRegistry = new LifecycleManagersRegistry();
                    ofFactoryRegistry.addFactoryFactory(new ScopeLifecycleManager<Object>());
                    ProvidersRegistry providersRegistry =
                        new ProvidersRegistry(ofFactoryRegistry, new ApplicationValidator());

                    final Set<Class<?>> classes = new ApplicationFileLoader(true).getClasses();
View Full Code Here

Examples of org.apache.wink.common.internal.lifecycle.LifecycleManagersRegistry

    @Override
    protected void setUp() throws Exception {
        super.setUp();

        LifecycleManagersRegistry ofFactoryRegistry = new LifecycleManagersRegistry();
        ofFactoryRegistry.addFactoryFactory(new ScopeLifecycleManager<Object>());
        ProvidersRegistry providersRegistry =
            new ProvidersRegistry(ofFactoryRegistry, new ApplicationValidator());

        Set<Class<?>> classes = new ApplicationFileLoader(true).getClasses();
        if (classes != null) {
View Full Code Here

Examples of org.apache.wink.common.internal.lifecycle.LifecycleManagersRegistry

     * use the same instance of the ApplicationValidator.
     */
    protected void initRegistries() {
        InjectableFactory.setInstance(new ServerInjectableFactory());
        if (ofFactoryRegistry == null) {
            ofFactoryRegistry = new LifecycleManagersRegistry();
            ofFactoryRegistry.addFactoryFactory(new ScopeLifecycleManager<Object>());
        }
        ApplicationValidator applicationValidator = new ApplicationValidator();
        providersRegistry = new ProvidersRegistry(ofFactoryRegistry, applicationValidator);
        resourceRegistry = new ResourceRegistry(ofFactoryRegistry, applicationValidator);
View Full Code Here

Examples of org.apache.wink.common.internal.lifecycle.LifecycleManagersRegistry

    public CdiDeploymentConfiguration(BeanManagerResolver beanManagerResolver) {
        if (beanManagerResolver == null) {
            beanManagerResolver = new DefaultBeanManagerResolver();
        }

        LifecycleManagersRegistry lifecycleManagersRegistry = new LifecycleManagersRegistry();
        setOfFactoryRegistry(lifecycleManagersRegistry);
        lifecycleManagersRegistry.addFactoryFactory(new CdiLifecycleManager(beanManagerResolver));
    }
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.