Package com.sun.jersey.core.spi.component

Examples of com.sun.jersey.core.spi.component.ComponentScope


        if (b == null) {
            return null;
        }

        final Class<? extends Annotation> s = b.getScope();
        final ComponentScope cs = getComponentScope(b);

        if (s == Dependent.class) {
            if (!c.isAnnotationPresent(ManagedBean.class)) {
                return null;
            }
View Full Code Here


    private interface ComponentProviderDestroyable extends IoCInstantiatedComponentProvider, IoCDestroyable {
    };

    private ComponentScope getComponentScope(Bean<?> b) {
        ComponentScope cs = scopeMap.get(b.getScope());
        return (cs != null) ? cs : ComponentScope.Undefined;
    }
View Full Code Here

            cp = componentProcessorMap.get(c);
            if (cp != null) {
                return (cp == NULL_COMPONENT_PROCESSOR) ? null : cp;
            }

            final ComponentScope cs = c.isAnnotationPresent(ManagedBean.class)
                    ? c.isAnnotationPresent(Provider.class)
                        ? ComponentScope.Singleton
                        : cpf.getScope(c)
                    : ComponentScope.Singleton;
            cp = cpf.get(c, cs);
View Full Code Here

            this.cpf = cpf;
        }

        public IoCComponentProvider getComponentProvider(final Class c) {
            if (PostConstructListener.class.isAssignableFrom(c)) {
                final ComponentScope cs = SingletonScope.class.isAssignableFrom(c) ? ComponentScope.Singleton : ComponentScope.PerRequest;
                final IoCComponentProcessor cp = cpf.get(c, cs);
                return new IoCFullyManagedComponentProvider() {

                    public Object getInstance() {
                        componentClass = c;
View Full Code Here

            } else {
                return null;
            }
        }

        ComponentScope componentScope = getComponentScope(key, i);
        LOGGER.log(Level.INFO, "Binding {0} to GuiceManagedComponentProvider with the scope \"{1}\"",
                new Object[]{clazz.getName(), componentScope});
        return new GuiceManagedComponentProvider(i, componentScope, clazz);
    }
View Full Code Here

                return ComponentScope.Singleton;
            }

            @Override
            public ComponentScope visitScope(Scope theScope) {
                ComponentScope cs = scopeMap.get(theScope);
                return (cs != null) ? cs : ComponentScope.Undefined;
            }

            @Override
            public ComponentScope visitScopeAnnotation(Class scopeAnnotation) {
View Full Code Here

      } else {
        return null;
      }
    }

    ComponentScope componentScope = getComponentScope(key, i);
    LOGGER.log(Level.INFO, "Binding {0} to GuiceManagedComponentProvider with the scope \"{1}\"",
               new Object[]{clazz.getName(), componentScope});
    return new GuiceManagedComponentProvider(i, componentScope, clazz);
  }
View Full Code Here

        return ComponentScope.Singleton;
      }

      @Override
      public ComponentScope visitScope(Scope theScope) {
        ComponentScope cs = scopeMap.get(theScope);
        return (cs != null) ? cs : ComponentScope.Undefined;
      }

      @Override
      public ComponentScope visitScopeAnnotation(Class scopeAnnotation) {
View Full Code Here

        if (b == null) {
            return null;
        }

        final Class<? extends Annotation> s = b.getScope();
        final ComponentScope cs = getComponentScope(b);

        if (s == Dependent.class) {
            if (!c.isAnnotationPresent(ManagedBean.class)) {
                return null;
            }
View Full Code Here

    private interface ComponentProviderDestroyable extends IoCInstantiatedComponentProvider, IoCDestroyable {
    };

    private ComponentScope getComponentScope(Bean<?> b) {
        ComponentScope cs = scopeMap.get(b.getScope());
        return (cs != null) ? cs : ComponentScope.Undefined;
    }
View Full Code Here

TOP

Related Classes of com.sun.jersey.core.spi.component.ComponentScope

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.