Package org.apache.avalon.framework.service

Examples of org.apache.avalon.framework.service.ServiceSelector.select()


                    try {
                        this.connection.execute( this.function );
                        streamerSelector =
                            (ServiceSelector)
                            this.manager.lookup( Web3Streamer.ROLE + "Selector" );
                        w3s = (Web3Streamer) streamerSelector.select( this.streamer );
                        w3s.stream( this.function,  super.contentHandler );
                    }
                    catch (Exception x) {
                        this.attributes.clear();
                        super.contentHandler.startElement(uri, Web3.ABAP_EXCEPTION_ELEM,
View Full Code Here


        ServiceSelector outputSelector = null;
        OutputModule output = null;
        try {
            outputSelector = (ServiceSelector) this.manager.lookup(OUTPUT_MODULE_SELECTOR);
            if (outputMode != null && outputSelector != null && outputSelector.isSelectable(outputMode)){
                output = (OutputModule) outputSelector.select(outputMode);
            }
            output.setAttribute( null, objectModel, key, value );
        } catch (Exception e) {
                if (getLogger().isWarnEnabled()) {
                    getLogger().warn("Could not select output mode "
View Full Code Here

            ServiceSelector inputSelector = null;
            InputModule input = null;
            try {
                inputSelector = (ServiceSelector) this.manager.lookup(INPUT_MODULE_SELECTOR);
                if (column.mode != null && inputSelector != null && inputSelector.isSelectable(column.mode)){
                    input = (InputModule) inputSelector.select(column.mode);
                }

                if (column.isSet) {
                    if (getLogger().isDebugEnabled())
                        getLogger().debug( "Trying to set column " + cname +" from "+column.mode+" using getAttributeValues method");
View Full Code Here

            ServiceSelector outputSelector = null;
            OutputModule output = null;
            try {
                outputSelector = (ServiceSelector) this.manager.lookup(OUTPUT_MODULE_SELECTOR);
                if (outputMode != null && outputSelector != null && outputSelector.isSelectable(outputMode)){
                    output = (OutputModule) outputSelector.select(outputMode);
                }
                output.commit(null, objectModel);
            } catch (Exception e) {
                if (getLogger().isWarnEnabled()) {
                    getLogger().warn("Could not select output mode "
View Full Code Here

                    ServiceSelector outputSelector = null;
                    OutputModule output = null;
                    try {
                        outputSelector = (ServiceSelector) this.manager.lookup(OUTPUT_MODULE_SELECTOR);
                        if (outputMode != null && outputSelector != null && outputSelector.isSelectable(outputMode)){
                            output = (OutputModule) outputSelector.select(outputMode);
                        }
                        output.rollback( null, objectModel, e);
                    } catch (Exception e2) {
                        if (getLogger().isWarnEnabled()) {
                            getLogger().warn("Could not select output mode "
View Full Code Here

        final String adapterName = cid.getCopletData().getCopletBaseData().getCopletAdapterName();
        CopletAdapter copletAdapter = null;
        ServiceSelector adapterSelector = null;
        try {
            adapterSelector = (ServiceSelector) this.manager.lookup(CopletAdapter.ROLE + "Selector");
            copletAdapter = (CopletAdapter) adapterSelector.select(adapterName);
            copletAdapter.toSAX(cid, new IncludeXMLConsumer(handler));
        } catch (ServiceException ce) {
            throw new SAXException("Unable to lookup component.", ce);
        } finally {
            if (null != copletAdapter) {
View Full Code Here

        try {
            try {
                selector = (ServiceSelector)this.manager.lookup(DataSourceComponent.ROLE + "Selector");

                datasource = (DataSourceComponent)selector.select(this.datasourceName);

            } catch(Exception e) {
                String msg = "Cannot get datasource '" + this.datasourceName + "'";
                getLogger().error(msg);
                throw new SourceException(msg, e);
View Full Code Here

                Iterator iter = copletInstanceDataManager.getCopletInstanceData().values().iterator();
                while ( iter.hasNext() ) {
                    CopletInstanceData cid = (CopletInstanceData) iter.next();
                    CopletAdapter adapter = null;
                    try {
                        adapter = (CopletAdapter)adapterSelector.select(cid.getCopletData().getCopletBaseData().getCopletAdapterName());
                        adapter.logout( cid );
                    } finally {
                        adapterSelector.release( adapter );
                    }
                }
View Full Code Here

        Object obj;
        ServiceSelector selector = null;
        InputModule inputModule = null;
        try {
            selector = (ServiceSelector) this.manager.lookup( InputModule.ROLE + "Selector" );
            inputModule = (InputModule) selector.select( inputModuleName );
            obj = inputModule.getAttribute( attributeName, null, this.objectModel );

        } catch ( ServiceException e ) {
            throw new SourceException( "Could not find an InputModule of the type " +
                                       inputModuleName , e );
View Full Code Here

                iputSelector = (ServiceSelector)this.manager.lookup(INPUT_MODULE_SELECTOR);
                if (this.inputName != null
                    && iputSelector != null
                    && iputSelector.isSelectable(this.inputName)) {

                    iput = (InputModule) iputSelector.select(this.inputName);
                }
                if (iput != null) {
                    values = iput.getAttributeValues(name, this.inputConf, objectModel);
                }
                if (getLogger().isDebugEnabled())
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.