/*====================================================================
Tnis file was produced by the OpenCCM ir3_jimpl generator.
OpenCCM: The Open CORBA Component Model Platform
Copyright (C) 2000-2002 USTL - LIFL - GOAL
Contact: openccm-team@objectweb.org
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 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 of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
USA
Initial developer(s): Philippe Merle, Mathieu Vadet.
Contributor(s): ______________________________________.
====================================================================*/
package cadena.mediumsp;
import cadena.common.CCM_TimeOutConsumer;
import cadena.common.ReadWriteData;
import cadena.common.ReadData;
/**
 **  Implementation skeleton class for the ::mediumsp::BMPushDataSource1 component.
 **  Business operations MUST be completed !!!
 **/
public class BMPushDataSource1MonolithicImpl
       extends org.omg.CORBA.LocalObject
       implements CCM_BMPushDataSource1,CCM_TimeOutConsumer,
                  org.omg.Components.SessionComponent
{
    // ==================================================================
    //
    // Internal State.
    //
    // ===================================================================
    private String data;
    /**
     **  Context reference.
     **/
    private CCM_BMPushDataSource1_Context the_context_;
    // ==================================================================
    //
    // Constructor.
    //
    // ===================================================================
    /**
     **  The default constructor.
     **/
    public
    BMPushDataSource1MonolithicImpl()
    {
        the_context_ = null;
    }
    // ==================================================================
    //
    // Internal methods.
    //
    // ===================================================================
    // ==================================================================
    //
    // Public methods.
    //
    // ===================================================================
    /**
     **  To obtain the context.
     **
     **  @return The context that has been previously set by
     **          the set_session_context operation.
     **/
    public CCM_BMPushDataSource1_Context
    getContext()
    {
        return the_context_;
    }
    // ==================================================================
    //
    // Methods for the OMG IDL Components::EnterpriseComponent local interface.
    //
    // ==================================================================
    //
    //  IDL:omg.org/Components/EnterpriseComponent/configuration_complete:1.0
    //
    /**
     **  Completes the component configuration.
     **
     **  @throws org.omg.Components.InvalidConfiguration
     **          Thrown if the configuration is invalid.
     **/
    public void
    configuration_complete()
    throws org.omg.Components.InvalidConfiguration
    {
        //
        //  TODO : implement !!!
        //
    }
    // ==================================================================
    //
    // Methods for the OMG IDL Components::SessionComponent local interface.
    //
    // ==================================================================
    //
    //  IDL:omg.org/Components/SessionComponent/set_session_context:1.0
    //
    /**
     *  Called by the container when the component session context will be fixed.
     *
     *  @param context The session context.
     *
     *  @throws org.omg.Components.CCMException
     *          Thrown if a system level error occured.
     */
    public void
    set_session_context(org.omg.Components.SessionContext context)
    throws org.omg.Components.CCMException
    {
        the_context_ = (CCM_BMPushDataSource1_Context)context;
    }
    //
    //  IDL:omg.org/Components/SessionComponent/ccm_activate:1.0
    //
    /**
     *
     * Called by the container when the component will be activated.
     *
     *  @throws org.omg.Components.CCMException
     *          Thrown if a system level error occured.
     */
    public void 
    ccm_activate()
    throws org.omg.Components.CCMException
    {
        //
        // Unused by actual OpenCCM containers
        //
    }
    //
    //  IDL:omg.org/Components/SessionComponent/ccm_passivate:1.0
    //
    /**
     *
     * Called by the container when the component will be passivated.
     *
     *  @throws org.omg.Components.CCMException
     *          Thrown if a system level error occured.
     */
    public void 
    ccm_passivate()
    throws org.omg.Components.CCMException
    {
        //
        // Unused by actual OpenCCM containers
        //
    }
    //
    //  IDL:omg.org/Components/SessionComponent/ccm_remove:1.0
    //
    /**
     *
     * Called by the container when the component will be removed.
     *
     *  @throws org.omg.Components.CCMException
     *          Thrown if a system level error occured.
     */
    public void 
    ccm_remove()
    throws org.omg.Components.CCMException
    {
        //
        // TO DO: implement !!!
        //
    }
    // ==================================================================
    //
    // Public methods for the CCM_BMPushDataSource1 local interface.
    //
    // ==================================================================
    //
    //  IDL:cadena/mediumsp/CCM_BMPushDataSource1/push_timeOut:1.0
    //
    /**
     **  Implementation of the ::mediumsp::CCM_BMPushDataSource1::push_timeOut operation.
     **/
    int counter=0;
    public void
    push_timeOut(cadena.common.TimeOut event)
    {
        push(event);
    }
    public void push(cadena.common.TimeOut event) {
	data="BMPushDataSource1#"+(++counter);
       ReadWriteData dataWriteOut1=the_context_.get_connection_dataWriteOut1();
       if(dataWriteOut1 == null) {
          System.err.println("The mediumsp::BMPushDataSource1::dataWriteOut1 receptacle is not set!");
          return;
        }  
       dataWriteOut1.data(data);
       
       ReadWriteData dataWriteOut2=the_context_.get_connection_dataWriteOut2();
       if(dataWriteOut2 == null) {
          System.err.println("The mediumsp::BMPushDataSource1::dataWriteOut2 receptacle is not set!");
          return;
        }  
       dataWriteOut2.data(data);
       
       ReadWriteData dataWriteOut3=the_context_.get_connection_dataWriteOut3();
       if(dataWriteOut3 == null) {
          System.err.println("The mediumsp::BMPushDataSource1::dataWriteOut3 receptacle is not set!");
          return;
        }  
       dataWriteOut3.data(data);
       
       ReadWriteData dataWriteOut4=the_context_.get_connection_dataWriteOut4();
       if(dataWriteOut4 == null) {
          System.err.println("The mediumsp::BMPushDataSource1::dataWriteOut4 receptacle is not set!");
          return;
        }  
       dataWriteOut4.data(data);

       ReadWriteData dataWriteOut5=the_context_.get_connection_dataWriteOut5();
       if(dataWriteOut5 == null) {
          System.err.println("The mediumsp::BMPushDataSource1::dataWriteOut5 receptacle is not set!");
          return;
        }  
       dataWriteOut5.data(data);

       ReadWriteData dataWriteOut6 = the_context_.get_connection_dataWriteOut6();
       if(dataWriteOut6 == null) {
          System.err.println("The mediumsp::BMPushDataSource1::dataWriteOut6 receptacle is not set!");
          return;
        }  
       dataWriteOut6.data(data);

       ReadWriteData dataWriteOut7=the_context_.get_connection_dataWriteOut7();
       if(dataWriteOut7 == null) {
          System.err.println("The mediumsp::BMPushDataSource1::dataWriteOut7 receptacle is not set!");
          return;
        }  
       dataWriteOut7.data(data);

       ReadWriteData dataWriteOut8=the_context_.get_connection_dataWriteOut8();
       if(dataWriteOut8 == null) {
          System.err.println("The mediumsp::BMPushDataSource1::dataWriteOut8 receptacle is not set!");
          return;
        }  
       dataWriteOut8.data(data);

      ReadWriteData dataWriteOut9=the_context_.get_connection_dataWriteOut9();
       if(dataWriteOut9 == null) {
          System.err.println("The mediumsp::BMPushDataSource1::dataWriteOut9 receptacle is not set!");
          return;
        }  
       dataWriteOut9.data(data); 

       ReadWriteData dataWriteOut10=the_context_.get_connection_dataWriteOut10();
       if(dataWriteOut10 == null) {
          System.err.println("The mediumsp::BMPushDataSource1::dataWriteOut10 receptacle is not set!");
          return;
        }  
       dataWriteOut10.data(data);

       ReadWriteData dataWriteOut11=the_context_.get_connection_dataWriteOut11();
       if(dataWriteOut11 == null) {
          System.err.println("The mediumsp::BMPushDataSource1::dataWriteOut11 receptacle is not set!");
          return;
        }  
       dataWriteOut11.data(data);

       ReadWriteData dataWriteOut12=the_context_.get_connection_dataWriteOut12();
       if(dataWriteOut12 == null) {
          System.err.println("The mediumsp::BMPushDataSource1::dataWriteOut12 receptacle is not set!");
          return;
        }  
       dataWriteOut12.data(data);
    }
}


syntax highlighted by Code2HTML, v. 0.9.1