⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 consumermonolithicwrapper.java

📁 直接放在eclipse环境下
💻 JAVA
字号:
/*====================================================================This file was produced by the OpenCCM ir3_java generator.OpenCCM: The Open CORBA Component Model PlatformCopyright (C) 2000-2002 USTL - LIFL - GOALContact: openccm-team@objectweb.orgThis library is free software; you can redistribute it and/ormodify it under the terms of the GNU Lesser General PublicLicense as published by the Free Software Foundation; eitherversion 2.1 of the License, or any later version.This library is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNULesser General Public License for more details.You should have received a copy of the GNU Lesser General PublicLicense along with this library; if not, write to the Free SoftwareFoundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307USAInitial developer(s): Mathieu Vadet.Contributor(s): Philippe Merle.====================================================================*/package org.objectweb.ccm.demo3;/** * Monolithic executor wrapper class for ::demo3::Consumer * * Wrap monolithic executors as executor locators. */public class ConsumerMonolithicWrapper     extends org.objectweb.openccm.Components.MonolithicWrapperBase{    // ==================================================================    //    // Internal State.    //    // ===================================================================        /** Reference to the wrapped monolithic executor instance. */    protected CCM_Consumer _monolithic_executor;        /** Wrapper for port from_servers. */    protected from_servers_ConsumerWrapper from_servers_wrapper_ =        new from_servers_ConsumerWrapper();    // ==================================================================    //    // Constructor.    //    // ===================================================================        /**     * The default constructor.     *     * @param executor The monolithic executor instance to wrap.     */    public    ConsumerMonolithicWrapper(org.omg.Components.EnterpriseComponent executor)    {        _monolithic_executor = (CCM_Consumer)executor;    }        // ==================================================================    //    // Internal methods.    //    // ===================================================================        // ==================================================================    //    // Public methods for OMG IDL ::Components::ExecutorLocator    //    // ==================================================================        //    //  IDL:omg.org/Components/ExecutorLocator/obtain_executor:1.0    //    /**     * Obtain an executor.     *     * @param name The executor name.     * @return The executor reference.     * @exception org.omg.Components.CCMException Thrown if any error.     */    public org.omg.CORBA.Object    obtain_executor(java.lang.String name)    throws org.omg.Components.CCMException    {        getLogger().trace(this, "Obtaining executor " + name);                if (name.equals("Consumer"))            return _monolithic_executor;                if (name.equals("from_servers"))            return from_servers_wrapper_;                getLogger().error(this, "Executor " + name + " not found");        throw new org.omg.Components.CCMException();    }        //    // IDL:omg.org/Components/ExecutorLocator/release_executor:1.0    //    /**     * Release an executor.     *     * @param executor The executor reference.     * @exception org.omg.Components.CCMException Thrown if any error.     */    public void    release_executor(org.omg.CORBA.Object executor)    throws org.omg.Components.CCMException    {        getLogger().trace(this, "Releasing executor " + executor);    }        // ==================================================================    //    // Wrapper classes for event sinks.    //    // ==================================================================        /**     * Internal wrapper class for OMG IDL CCM_TextEventConsumer     */    class from_servers_ConsumerWrapper    extends org.objectweb.corba.util.LocalObjectBase    implements org.objectweb.ccm.demo3.CCM_TextEventConsumer    {        //        // IDL:ccm.objectweb.org/demo3/CCM_TextEventConsumer/push:1.0        //        /**         * Wrap OMG IDL ::demo3::CCM_TextEventConsumer::push.         */        public void        push(org.objectweb.ccm.demo3.TextEvent event)        {            _monolithic_executor.push_from_servers(event);        }    }    }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -