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

Examples of com.sun.jersey.core.spi.component.ComponentInjector.inject()


            if (destroyable == null) {
                ComponentInjector ci = new ComponentInjector(
                        ipc,
                        c);
                ci.inject(iicp.getInjectableInstance(o));
            }
        }

        @Override
        public Object getInstance() {
View Full Code Here


                Class c) {
            ComponentInjector rci = new ComponentInjector(
                    ipc,
                    c);
            o = iicp.getInstance();
            rci.inject(iicp.getInjectableInstance(o));
        }

        @Override
        public Object getInstance() {
            return o;
View Full Code Here

                public void preConstruct() {
                }

                @Override
                public void postConstruct(Object o) {
                    ci.inject(o);
                }
            };
        }
    }
View Full Code Here

            final AbstractResource ar = wa.getAbstractResource(o);
            // Configure meta-data
            wa.initiateResource(ar, o);
           
            final ComponentInjector ci = new ComponentInjector(injectableFactory, o.getClass());
            ci.inject(o);

            addRule(ar.getPath().getValue(), o);
        }

        // Process root resource classes
View Full Code Here

            } else {
                // Configure meta-data
                wa.initiateResource(explicitRootResources.get(path));

                final ComponentInjector ci = new ComponentInjector(injectableFactory, o.getClass());
                ci.inject(o);

                addRule(path, o);
            }
        }
View Full Code Here

                    implictProduces,
                    FilterFactory.getRequestFilters(resourceFilters),
                    FilterFactory.getResponseFilters(resourceFilters));
            ComponentInjector<ViewableRule> ci = new ComponentInjector(injectableContext,
                    ViewableRule.class);
            ci.inject(r);

            // The matching rule for a sub-resource template
            patterns.add(new PatternRulePair<UriRule>(
                    new UriPattern("/([^/]+)"), r));
            // The matching rule for an index template
View Full Code Here

                Class c) {
            ComponentInjector rci = new ComponentInjector(
                    ipc,
                    c);
            o = iicp.getInstance();
            rci.inject(iicp.getInjectableInstance(o));
        }

        public Object getInstance() {
            return o;
        }
View Full Code Here

                        ". This singleton will be ignored");
                continue;
            }

            ComponentInjector ci = new ComponentInjector(injectableFactory, o.getClass());
            ci.inject(o);

            UriTemplate t = new PathTemplate(ar.getPath().getValue());

            ensureTemplateUnused(t, ar, uriTemplatesUsed);
View Full Code Here

        ComponentInjector<ViewableRule> ci = new ComponentInjector(injectableContext,
                ViewableRule.class);
        List<PatternRulePair<UriRule>> patterns = new ArrayList<PatternRulePair<UriRule>>();
        if (config.getFeature(ResourceConfig.FEATURE_IMPLICIT_VIEWABLES)) {
            ViewableRule r = new ViewableRule();
            ci.inject(r);

            // The matching rule for a sub-resource template
            patterns.add(new PatternRulePair<UriRule>(
                    new UriPattern("/([^/]+)"), r));       
            // The matching rule for an index template
View Full Code Here

                    new ComponentConstructor(ipc, providerFactoryClass);
            ResourceComponentProviderFactory rcpf = cc.getInstance();

            ComponentInjector<ResourceComponentProviderFactory> ci =
                    new ComponentInjector(ipc, providerFactoryClass);
            ci.inject(rcpf);

            return rcpf;
        } catch (IllegalArgumentException ex) {
            throw new ContainerException("Unable to create resource component provider", ex);
        } catch (InvocationTargetException ex) {
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.