Package org.apache.avalon.framework.component

Examples of org.apache.avalon.framework.component.ComponentSelector.select()


            selector = (ComponentSelector) this.newManager.lookup(Transformer.ROLE + "Selector");
        } catch (ComponentException ce) {
            throw new ProcessingException("Lookup of transformer selector failed at " + getLocation(param), ce);
        }
        try {
            this.transformers.add(selector.select(role));
            this.transformerSelectors.add(selector);
        } catch (ComponentException ce) {
            throw new ProcessingException("Lookup of transformer '"+role+"' failed at " + getLocation(param), ce);
        }
        this.transformerSources.add(source);
View Full Code Here


                    ComponentSelector selector = null;
                    Serializer serializer = null;
                    ByteArrayOutputStream oStream = new ByteArrayOutputStream();
                    try {
                        selector = (ComponentSelector)manager.lookup(Serializer.ROLE + "Selector");
                        serializer = (Serializer)selector.select(serializerName);
                        serializer.setOutputStream(oStream);
                        serializer.startDocument();
                        DOMStreamer streamer = new DOMStreamer(serializer);
                        streamer.stream(frag);
                        serializer.endDocument();
View Full Code Here

            selector = (ComponentSelector) this.newManager.lookup(Transformer.ROLE + "Selector");
        } catch (ComponentException ce) {
            throw new ProcessingException("Lookup of transformer selector failed at " + getLocation(param), ce);
        }
        try {
            this.transformers.add(selector.select(role));
            this.transformerSelectors.add(selector);
        } catch (ComponentException ce) {
            throw new ProcessingException("Lookup of transformer '"+role+"' failed at " + getLocation(param), ce);
        }
        this.transformerSources.add(source);
View Full Code Here

                  ComponentSelector selector = null;
                  Serializer serializer = null;
                  OutputStream oStream = null;
                  try {
                       selector = (ComponentSelector)manager.lookup(Serializer.ROLE + "Selector");
                       serializer = (Serializer)selector.select(serializerName);
                       oStream = ws.getOutputStream();
                       serializer.setOutputStream(oStream);
                         serializer.startDocument();
                       DOMStreamer streamer = new DOMStreamer(serializer);
                       streamer.stream(frag);
View Full Code Here

        this.manager = manager;

        try {
            ComponentSelector selector = (ComponentSelector)manager.lookup(Interpreter.ROLE);
            // Obtain the Interpreter instance for this language
            interpreter = (Interpreter)selector.select(language);
        } catch (Exception ex) {
            throw new ComponentException(language,
                "ScriptNode: Couldn't obtain a flow interpreter for " + language + ": " + ex);
        }
    }
View Full Code Here

                inputSelector=(ComponentSelector) this.manager.lookup(INPUT_MODULE_SELECTOR);

            if (inputSelector.hasComponent(type)){
               
                if (type != null && inputSelector.hasComponent(type))
                    module = (InputModule) inputSelector.select(type);
               
                if (!(module instanceof ThreadSafe) ) {
                    inputSelector.release(module);
                    module = null;
                }
View Full Code Here

            if (input == null) {
                if (cs.hasComponent(name)) {
                    release = true;
                    try {
                    input = (InputModule) cs.select(name);
                    } catch (ComponentException e) {
                        throw new ConfigurationException(
                                "MetaModule unable to create "+
                                (useDynamic ? "dynamically" : "statically")+
                                " specified internal module '"+name+"'", e);
View Full Code Here

            if (inputName != null && inputSelector != null && inputSelector.hasComponent(inputName)){
                input = (InputModule) inputSelector.select(inputName);
            }
            outputSelector=(ComponentSelector) this.manager.lookup(OUTPUT_MODULE_SELECTOR);
            if (outputName != null && outputSelector != null && outputSelector.hasComponent(outputName)){
                output = (OutputModule) outputSelector.select(outputName);
            }


            if (input != null  && output != null) {
                if (getLogger().isDebugEnabled()) getLogger().debug("got input and output modules");
View Full Code Here

            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
            assertNotNull("Test lookup of source resolver", resolver);

            assertNotNull("Test if matcher name is not null", type);
            matcher = (Matcher) selector.select(type);
            assertNotNull("Test lookup of matcher", matcher);

            result = matcher.match(pattern, objectmodel, parameters);

        } catch (ComponentException ce) {
View Full Code Here

            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
            assertNotNull("Test lookup of source resolver", resolver);

            assertNotNull("Test if action name is not null", type);
            action = (Action) selector.select(type);
            assertNotNull("Test lookup of action", action);

            result = action.act(redirector, new SourceResolverAdapter(resolver, this.manager),
                                objectmodel, source, parameters);
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.