/* -*- C++ -*- $Id$ */

// ******  Code generated by the The ACE ORB (TAO) IDL Compiler *******
// TAO and the TAO IDL Compiler have been developed by the Center for
// Distributed Object Computing at Washington University, St. Louis.
//
// Information about TAO is available at:
//                 http://www.cs.wustl.edu/~schmidt/TAO.html

#include "CosEventChannelAdminC.h"

#if !defined (__ACE_INLINE__)
#include "CosEventChannelAdminC.i"
#endif /* !defined INLINE */

// default constructor
CosEventChannelAdmin::AlreadyConnected::AlreadyConnected (void)
  : CORBA_UserException (::CosEventChannelAdmin::_tc_AlreadyConnected)
{
}

// destructor - all members are of self managing types
CosEventChannelAdmin::AlreadyConnected::~AlreadyConnected (void)
{
}

// copy constructor
CosEventChannelAdmin::AlreadyConnected::AlreadyConnected (const ::CosEventChannelAdmin::AlreadyConnected &_tao_excp)
  : CORBA_UserException (_tao_excp._type ())
{
  }

// assignment operator
CosEventChannelAdmin::AlreadyConnected&
CosEventChannelAdmin::AlreadyConnected::operator= (const ::CosEventChannelAdmin::AlreadyConnected &_tao_excp)
{

  this->CORBA_UserException::operator= (_tao_excp);
  return *this;
}

// narrow
CosEventChannelAdmin::AlreadyConnected_ptr 
CosEventChannelAdmin::AlreadyConnected::_narrow (CORBA::Exception *exc)
{
  if (!ACE_OS::strcmp ("IDL:omg.org/CosEventChannelAdmin/AlreadyConnected:1.0", exc->_id ())) // same type
    return ACE_dynamic_cast (AlreadyConnected_ptr, exc);
  else
    return 0;
}


void CosEventChannelAdmin::AlreadyConnected::_raise ()
{
  TAO_RAISE(*this);
}


void CosEventChannelAdmin::AlreadyConnected::_tao_encode (
    TAO_OutputCDR &cdr,
    CORBA::Environment &ACE_TRY_ENV) const
{
  if (cdr << *this)
    return;
  ACE_THROW (CORBA::MARSHAL ());
}


void CosEventChannelAdmin::AlreadyConnected::_tao_decode (
    TAO_InputCDR &cdr,
    CORBA::Environment &ACE_TRY_ENV)
{
  if (cdr >> *this)
    return;
  ACE_THROW (CORBA::MARSHAL ());
}

// TAO extension - the _alloc method
CORBA::Exception *CosEventChannelAdmin::AlreadyConnected::_alloc (void)
{
  CORBA::Exception *retval = 0;
  ACE_NEW_RETURN (retval, ::CosEventChannelAdmin::AlreadyConnected, 0);
  return retval;
}

static const CORBA::Long _oc_CosEventChannelAdmin_AlreadyConnected[] =
{
  TAO_ENCAP_BYTE_ORDER, // byte order
  54, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x436f7345), ACE_NTOHL (0x76656e74), ACE_NTOHL (0x4368616e), ACE_NTOHL (0x6e656c41), ACE_NTOHL (0x646d696e), ACE_NTOHL (0x2f416c72), ACE_NTOHL (0x65616479), ACE_NTOHL (0x436f6e6e), ACE_NTOHL (0x65637465), ACE_NTOHL (0x643a312e), ACE_NTOHL (0x30000000),  // repository ID = IDL:omg.org/CosEventChannelAdmin/AlreadyConnected:1.0
  17, ACE_NTOHL (0x416c7265), ACE_NTOHL (0x61647943), ACE_NTOHL (0x6f6e6e65), ACE_NTOHL (0x63746564), ACE_NTOHL (0x0),  // name = AlreadyConnected
  0, // member count
};
static CORBA::TypeCode _tc_TAO_tc_CosEventChannelAdmin_AlreadyConnected (CORBA::tk_except, sizeof (_oc_CosEventChannelAdmin_AlreadyConnected), (char *) &_oc_CosEventChannelAdmin_AlreadyConnected, 0, sizeof (CosEventChannelAdmin::AlreadyConnected));
TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
TAO_NAMESPACE_BEGIN (CosEventChannelAdmin)
TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_AlreadyConnected, &_tc_TAO_tc_CosEventChannelAdmin_AlreadyConnected)
TAO_NAMESPACE_END
// default constructor
CosEventChannelAdmin::TypeError::TypeError (void)
  : CORBA_UserException (::CosEventChannelAdmin::_tc_TypeError)
{
}

// destructor - all members are of self managing types
CosEventChannelAdmin::TypeError::~TypeError (void)
{
}

// copy constructor
CosEventChannelAdmin::TypeError::TypeError (const ::CosEventChannelAdmin::TypeError &_tao_excp)
  : CORBA_UserException (_tao_excp._type ())
{
  }

// assignment operator
CosEventChannelAdmin::TypeError&
CosEventChannelAdmin::TypeError::operator= (const ::CosEventChannelAdmin::TypeError &_tao_excp)
{

  this->CORBA_UserException::operator= (_tao_excp);
  return *this;
}

// narrow
CosEventChannelAdmin::TypeError_ptr 
CosEventChannelAdmin::TypeError::_narrow (CORBA::Exception *exc)
{
  if (!ACE_OS::strcmp ("IDL:omg.org/CosEventChannelAdmin/TypeError:1.0", exc->_id ())) // same type
    return ACE_dynamic_cast (TypeError_ptr, exc);
  else
    return 0;
}


void CosEventChannelAdmin::TypeError::_raise ()
{
  TAO_RAISE(*this);
}


void CosEventChannelAdmin::TypeError::_tao_encode (
    TAO_OutputCDR &cdr,
    CORBA::Environment &ACE_TRY_ENV) const
{
  if (cdr << *this)
    return;
  ACE_THROW (CORBA::MARSHAL ());
}


void CosEventChannelAdmin::TypeError::_tao_decode (
    TAO_InputCDR &cdr,
    CORBA::Environment &ACE_TRY_ENV)
{
  if (cdr >> *this)
    return;
  ACE_THROW (CORBA::MARSHAL ());
}

// TAO extension - the _alloc method
CORBA::Exception *CosEventChannelAdmin::TypeError::_alloc (void)
{
  CORBA::Exception *retval = 0;
  ACE_NEW_RETURN (retval, ::CosEventChannelAdmin::TypeError, 0);
  return retval;
}

static const CORBA::Long _oc_CosEventChannelAdmin_TypeError[] =
{
  TAO_ENCAP_BYTE_ORDER, // byte order
  47, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x436f7345), ACE_NTOHL (0x76656e74), ACE_NTOHL (0x4368616e), ACE_NTOHL (0x6e656c41), ACE_NTOHL (0x646d696e), ACE_NTOHL (0x2f547970), ACE_NTOHL (0x65457272), ACE_NTOHL (0x6f723a31), ACE_NTOHL (0x2e300000),  // repository ID = IDL:omg.org/CosEventChannelAdmin/TypeError:1.0
  10, ACE_NTOHL (0x54797065), ACE_NTOHL (0x4572726f), ACE_NTOHL (0x72000000),  // name = TypeError
  0, // member count
};
static CORBA::TypeCode _tc_TAO_tc_CosEventChannelAdmin_TypeError (CORBA::tk_except, sizeof (_oc_CosEventChannelAdmin_TypeError), (char *) &_oc_CosEventChannelAdmin_TypeError, 0, sizeof (CosEventChannelAdmin::TypeError));
TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
TAO_NAMESPACE_BEGIN (CosEventChannelAdmin)
TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_TypeError, &_tc_TAO_tc_CosEventChannelAdmin_TypeError)
TAO_NAMESPACE_END
CosEventChannelAdmin::ProxyPushConsumer_ptr CosEventChannelAdmin::ProxyPushConsumer::_narrow (
    CORBA::Object_ptr obj,
    CORBA::Environment &ACE_TRY_ENV
  )
{
  if (CORBA::is_nil (obj))
    return ProxyPushConsumer::_nil ();
  CORBA::Boolean is_a = obj->_is_a ("IDL:omg.org/CosEventChannelAdmin/ProxyPushConsumer:1.0", ACE_TRY_ENV);
  ACE_CHECK_RETURN (ProxyPushConsumer::_nil ());
  if (is_a == 0)
    return ProxyPushConsumer::_nil ();
  return ProxyPushConsumer::_unchecked_narrow (obj, ACE_TRY_ENV);
}

CosEventChannelAdmin::ProxyPushConsumer_ptr CosEventChannelAdmin::ProxyPushConsumer::_unchecked_narrow (
    CORBA::Object_ptr obj,
    CORBA::Environment &
  )
{
  if (CORBA::is_nil (obj))
    return ProxyPushConsumer::_nil ();
  TAO_Stub* stub = obj->_stubobj ();
  stub->_incr_refcnt ();
  ProxyPushConsumer_ptr default_proxy = ProxyPushConsumer::_nil ();
  if (obj->_is_collocated () && _TAO_collocation_CosEventChannelAdmin_ProxyPushConsumer_Stub_Factory_function_pointer != 0)
    {
      default_proxy = _TAO_collocation_CosEventChannelAdmin_ProxyPushConsumer_Stub_Factory_function_pointer (obj);
    }
  if (CORBA::is_nil (default_proxy))
    ACE_NEW_RETURN (default_proxy, ProxyPushConsumer (stub), ProxyPushConsumer::_nil ());
  return TAO_CosEventChannelAdmin_ProxyPushConsumer_PROXY_FACTORY_ADAPTER::instance ()->create_proxy (default_proxy);
}

CosEventChannelAdmin::ProxyPushConsumer_ptr 
CosEventChannelAdmin::ProxyPushConsumer::_duplicate (ProxyPushConsumer_ptr obj)
{
  if (!CORBA::is_nil (obj))
    obj->_incr_refcnt ();
  return obj;
}

void CosEventChannelAdmin::ProxyPushConsumer::connect_push_supplier (
    CosEventComm::PushSupplier_ptr push_supplier,
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    CosEventChannelAdmin::AlreadyConnected
  ))
{
  
  static TAO_Exception_Data _tao_CosEventChannelAdmin_ProxyPushConsumer_connect_push_supplier_exceptiondata [] = 
  {
    {CosEventChannelAdmin::_tc_AlreadyConnected, CosEventChannelAdmin::AlreadyConnected::_alloc}
  };


  
  
  TAO_Stub *istub = this->_stubobj ();
  if (istub == 0)
    ACE_THROW (CORBA::INTERNAL ());

  
  TAO_GIOP_Twoway_Invocation _tao_call (
      istub,
      "connect_push_supplier",
      21,
      istub->orb_core ()
    );

#if defined (TAO_HAS_INTERCEPTORS)
    TAO_ClientRequestInterceptor_Adapter
      _tao_vfr (istub->orb_core ()->orb ()->_get_client_interceptor (ACE_TRY_ENV));
    ACE_CHECK;
    PortableInterceptor::Cookies _tao_cookies;
    CORBA::NVList_var _tao_interceptor_args;
    if (_tao_vfr.valid ())
      {
        istub->orb_core ()->orb ()->create_list (0, _tao_interceptor_args.inout (), ACE_TRY_ENV);
        ACE_CHECK;
      }

    ACE_TRY
      {
#endif /* TAO_HAS_INTERCEPTORS */

      for (;;)
      {
        _tao_call.start (ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK;

        TAO_INTERCEPTOR (
            _tao_vfr.preinvoke (
                _tao_call.request_id (),
                1,
                this,
                "connect_push_supplier",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK;
        CORBA::Short flag = 131;
        // Tremporary hack until GIOP 1.2 is implemented.
        
        _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK;

        TAO_OutputCDR &_tao_out = _tao_call.out_stream ();
        if (!(
              (_tao_out << push_supplier)
          ))
          TAO_INTERCEPTOR_THROW (CORBA::MARSHAL ());
        int _invoke_status =
          _tao_call.invoke (_tao_CosEventChannelAdmin_ProxyPushConsumer_connect_push_supplier_exceptiondata, 1, ACE_TRY_ENV);
                TAO_INTERCEPTOR_CHECK;

        if (_invoke_status == TAO_INVOKE_RESTART)
          continue;
        if (_invoke_status != TAO_INVOKE_OK)
        {
          TAO_INTERCEPTOR_THROW (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES));
        }
        
        TAO_INTERCEPTOR (
            _tao_vfr.postinvoke (
                _tao_call.request_id (),
                1,
                this,
                "connect_push_supplier",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK;
        break;
        
      }
#if defined (TAO_HAS_INTERCEPTORS)
      
    }
  ACE_CATCHANY
    {
      _tao_vfr.exception_occurred (
          _tao_call.request_id (),
          1,
          this,
          "connect_push_supplier",
          _tao_cookies,
          ACE_TRY_ENV
        );
      ACE_RETHROW;
    }
  ACE_ENDTRY;
  ACE_CHECK;
#endif /* TAO_HAS_INTERCEPTORS */

}

CORBA::Boolean CosEventChannelAdmin::ProxyPushConsumer::_is_a (const CORBA::Char *value, CORBA::Environment &ACE_TRY_ENV)
{
  if (
    (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CosEventChannelAdmin/ProxyPushConsumer:1.0")) ||
    (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CosEventComm/PushConsumer:1.0")) ||
    (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CORBA/Object:1.0")))
  return 1; // success using local knowledge
  else
    return this->CORBA_Object::_is_a (value, ACE_TRY_ENV);
}

const char* CosEventChannelAdmin::ProxyPushConsumer::_interface_repository_id (void) const
{
  return "IDL:omg.org/CosEventChannelAdmin/ProxyPushConsumer:1.0";
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPushConsumer_Default_Proxy_Factory::TAO_CosEventChannelAdmin_ProxyPushConsumer_Default_Proxy_Factory (int register_proxy_factory)
{
  if (register_proxy_factory)
    {
      TAO_CosEventChannelAdmin_ProxyPushConsumer_PROXY_FACTORY_ADAPTER::instance ()->register_proxy_factory (this);
    }
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPushConsumer_Default_Proxy_Factory::~TAO_CosEventChannelAdmin_ProxyPushConsumer_Default_Proxy_Factory (void)
{
}

CosEventChannelAdmin::ProxyPushConsumer_ptr
CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPushConsumer_Default_Proxy_Factory::create_proxy (
    ::CosEventChannelAdmin::ProxyPushConsumer_ptr proxy,
    CORBA::Environment &
  )
{
  return proxy;
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPushConsumer_Proxy_Factory_Adapter::TAO_CosEventChannelAdmin_ProxyPushConsumer_Proxy_Factory_Adapter (void)
   : proxy_factory_ (0),
     delete_proxy_factory_ (0)
{
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPushConsumer_Proxy_Factory_Adapter::~TAO_CosEventChannelAdmin_ProxyPushConsumer_Proxy_Factory_Adapter (void)
{
  // Making sure the factory which the adapter has is destroyed with it.
  if (this->proxy_factory_ != 0)
    delete this->proxy_factory_;
}

int
CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPushConsumer_Proxy_Factory_Adapter::register_proxy_factory (
  TAO_CosEventChannelAdmin_ProxyPushConsumer_Default_Proxy_Factory *df,
     CORBA::Environment &ACE_TRY_ENV
      )
{
  ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
    this->lock_, 0));
  // Remove any existing <proxy_factory_> and replace with the new one.
  this->unregister_proxy_factory (ACE_TRY_ENV);
  this->proxy_factory_ = df;
  this->delete_proxy_factory_ = 0;
return 0;
}

int
CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPushConsumer_Proxy_Factory_Adapter::unregister_proxy_factory (
  CORBA::Environment &
    )
{
  ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
    this->lock_, 0));
  if (this->delete_proxy_factory_ == 0 && this->proxy_factory_ != 0)
    {
      // Its necessary to set <delete_proxy_factory_> to 1 to make sure that it
      // doesnt get into an infinite loop in <unregister_proxy_factory> as it is 
      // invoked in the destructor of the class too.
      this->delete_proxy_factory_ = 1;
      delete this->proxy_factory_;
      this->proxy_factory_ = 0;
    }
return 0;
}

CosEventChannelAdmin::ProxyPushConsumer_ptr
CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPushConsumer_Proxy_Factory_Adapter::create_proxy (
    ::CosEventChannelAdmin::ProxyPushConsumer_ptr proxy,
    CORBA::Environment &
  )
{
  ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
    this->lock_, 0));
  // Verify that an <proxy_factory_> is available else make one.
  if (this->proxy_factory_ == 0)
    ACE_NEW_RETURN (this->proxy_factory_,
        TAO_CosEventChannelAdmin_ProxyPushConsumer_Default_Proxy_Factory (1), 
         0);
      
    
  return this->proxy_factory_->create_proxy (proxy);
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPushConsumer_Smart_Proxy_Base::TAO_CosEventChannelAdmin_ProxyPushConsumer_Smart_Proxy_Base (::CosEventChannelAdmin::ProxyPushConsumer_ptr proxy)
: base_proxy_ (proxy)
{
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPushConsumer_Smart_Proxy_Base::~TAO_CosEventChannelAdmin_ProxyPushConsumer_Smart_Proxy_Base (void)
{
}

void CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPushConsumer_Smart_Proxy_Base::connect_push_supplier  (
    CosEventComm::PushSupplier_ptr push_supplier,
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    CosEventChannelAdmin::AlreadyConnected
  ))
{
  this->base_proxy_->connect_push_supplier (
      push_supplier,
      ACE_TRY_ENV
    );

}

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
  defined (ACE_HAS_GNU_REPO)
template class ACE_Singleton<CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPushConsumer_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#pragma instantiate ACE_Singleton<CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPushConsumer_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

static const CORBA::Long _oc_CosEventChannelAdmin_ProxyPushConsumer[] =
{
  TAO_ENCAP_BYTE_ORDER, // byte order
  55, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x436f7345), ACE_NTOHL (0x76656e74), ACE_NTOHL (0x4368616e), ACE_NTOHL (0x6e656c41), ACE_NTOHL (0x646d696e), ACE_NTOHL (0x2f50726f), ACE_NTOHL (0x78795075), ACE_NTOHL (0x7368436f), ACE_NTOHL (0x6e73756d), ACE_NTOHL (0x65723a31), ACE_NTOHL (0x2e300000),  // repository ID = IDL:omg.org/CosEventChannelAdmin/ProxyPushConsumer:1.0
  18, ACE_NTOHL (0x50726f78), ACE_NTOHL (0x79507573), ACE_NTOHL (0x68436f6e), ACE_NTOHL (0x73756d65), ACE_NTOHL (0x72000000),  // name = ProxyPushConsumer
};
static CORBA::TypeCode _tc_TAO_tc_CosEventChannelAdmin_ProxyPushConsumer (CORBA::tk_objref, sizeof (_oc_CosEventChannelAdmin_ProxyPushConsumer), (char *) &_oc_CosEventChannelAdmin_ProxyPushConsumer, 0, sizeof (CosEventChannelAdmin::ProxyPushConsumer));
TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
TAO_NAMESPACE_BEGIN (CosEventChannelAdmin)
TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_ProxyPushConsumer, &_tc_TAO_tc_CosEventChannelAdmin_ProxyPushConsumer)
TAO_NAMESPACE_END
CosEventChannelAdmin::ProxyPullSupplier_ptr CosEventChannelAdmin::ProxyPullSupplier::_narrow (
    CORBA::Object_ptr obj,
    CORBA::Environment &ACE_TRY_ENV
  )
{
  if (CORBA::is_nil (obj))
    return ProxyPullSupplier::_nil ();
  CORBA::Boolean is_a = obj->_is_a ("IDL:omg.org/CosEventChannelAdmin/ProxyPullSupplier:1.0", ACE_TRY_ENV);
  ACE_CHECK_RETURN (ProxyPullSupplier::_nil ());
  if (is_a == 0)
    return ProxyPullSupplier::_nil ();
  return ProxyPullSupplier::_unchecked_narrow (obj, ACE_TRY_ENV);
}

CosEventChannelAdmin::ProxyPullSupplier_ptr CosEventChannelAdmin::ProxyPullSupplier::_unchecked_narrow (
    CORBA::Object_ptr obj,
    CORBA::Environment &
  )
{
  if (CORBA::is_nil (obj))
    return ProxyPullSupplier::_nil ();
  TAO_Stub* stub = obj->_stubobj ();
  stub->_incr_refcnt ();
  ProxyPullSupplier_ptr default_proxy = ProxyPullSupplier::_nil ();
  if (obj->_is_collocated () && _TAO_collocation_CosEventChannelAdmin_ProxyPullSupplier_Stub_Factory_function_pointer != 0)
    {
      default_proxy = _TAO_collocation_CosEventChannelAdmin_ProxyPullSupplier_Stub_Factory_function_pointer (obj);
    }
  if (CORBA::is_nil (default_proxy))
    ACE_NEW_RETURN (default_proxy, ProxyPullSupplier (stub), ProxyPullSupplier::_nil ());
  return TAO_CosEventChannelAdmin_ProxyPullSupplier_PROXY_FACTORY_ADAPTER::instance ()->create_proxy (default_proxy);
}

CosEventChannelAdmin::ProxyPullSupplier_ptr 
CosEventChannelAdmin::ProxyPullSupplier::_duplicate (ProxyPullSupplier_ptr obj)
{
  if (!CORBA::is_nil (obj))
    obj->_incr_refcnt ();
  return obj;
}

void CosEventChannelAdmin::ProxyPullSupplier::connect_pull_consumer (
    CosEventComm::PullConsumer_ptr pull_consumer,
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    CosEventChannelAdmin::AlreadyConnected
  ))
{
  
  static TAO_Exception_Data _tao_CosEventChannelAdmin_ProxyPullSupplier_connect_pull_consumer_exceptiondata [] = 
  {
    {CosEventChannelAdmin::_tc_AlreadyConnected, CosEventChannelAdmin::AlreadyConnected::_alloc}
  };


  
  
  TAO_Stub *istub = this->_stubobj ();
  if (istub == 0)
    ACE_THROW (CORBA::INTERNAL ());

  
  TAO_GIOP_Twoway_Invocation _tao_call (
      istub,
      "connect_pull_consumer",
      21,
      istub->orb_core ()
    );

#if defined (TAO_HAS_INTERCEPTORS)
    TAO_ClientRequestInterceptor_Adapter
      _tao_vfr (istub->orb_core ()->orb ()->_get_client_interceptor (ACE_TRY_ENV));
    ACE_CHECK;
    PortableInterceptor::Cookies _tao_cookies;
    CORBA::NVList_var _tao_interceptor_args;
    if (_tao_vfr.valid ())
      {
        istub->orb_core ()->orb ()->create_list (0, _tao_interceptor_args.inout (), ACE_TRY_ENV);
        ACE_CHECK;
      }

    ACE_TRY
      {
#endif /* TAO_HAS_INTERCEPTORS */

      for (;;)
      {
        _tao_call.start (ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK;

        TAO_INTERCEPTOR (
            _tao_vfr.preinvoke (
                _tao_call.request_id (),
                1,
                this,
                "connect_pull_consumer",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK;
        CORBA::Short flag = 131;
        // Tremporary hack until GIOP 1.2 is implemented.
        
        _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK;

        TAO_OutputCDR &_tao_out = _tao_call.out_stream ();
        if (!(
              (_tao_out << pull_consumer)
          ))
          TAO_INTERCEPTOR_THROW (CORBA::MARSHAL ());
        int _invoke_status =
          _tao_call.invoke (_tao_CosEventChannelAdmin_ProxyPullSupplier_connect_pull_consumer_exceptiondata, 1, ACE_TRY_ENV);
                TAO_INTERCEPTOR_CHECK;

        if (_invoke_status == TAO_INVOKE_RESTART)
          continue;
        if (_invoke_status != TAO_INVOKE_OK)
        {
          TAO_INTERCEPTOR_THROW (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES));
        }
        
        TAO_INTERCEPTOR (
            _tao_vfr.postinvoke (
                _tao_call.request_id (),
                1,
                this,
                "connect_pull_consumer",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK;
        break;
        
      }
#if defined (TAO_HAS_INTERCEPTORS)
      
    }
  ACE_CATCHANY
    {
      _tao_vfr.exception_occurred (
          _tao_call.request_id (),
          1,
          this,
          "connect_pull_consumer",
          _tao_cookies,
          ACE_TRY_ENV
        );
      ACE_RETHROW;
    }
  ACE_ENDTRY;
  ACE_CHECK;
#endif /* TAO_HAS_INTERCEPTORS */

}

CORBA::Boolean CosEventChannelAdmin::ProxyPullSupplier::_is_a (const CORBA::Char *value, CORBA::Environment &ACE_TRY_ENV)
{
  if (
    (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CosEventChannelAdmin/ProxyPullSupplier:1.0")) ||
    (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CosEventComm/PullSupplier:1.0")) ||
    (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CORBA/Object:1.0")))
  return 1; // success using local knowledge
  else
    return this->CORBA_Object::_is_a (value, ACE_TRY_ENV);
}

const char* CosEventChannelAdmin::ProxyPullSupplier::_interface_repository_id (void) const
{
  return "IDL:omg.org/CosEventChannelAdmin/ProxyPullSupplier:1.0";
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPullSupplier_Default_Proxy_Factory::TAO_CosEventChannelAdmin_ProxyPullSupplier_Default_Proxy_Factory (int register_proxy_factory)
{
  if (register_proxy_factory)
    {
      TAO_CosEventChannelAdmin_ProxyPullSupplier_PROXY_FACTORY_ADAPTER::instance ()->register_proxy_factory (this);
    }
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPullSupplier_Default_Proxy_Factory::~TAO_CosEventChannelAdmin_ProxyPullSupplier_Default_Proxy_Factory (void)
{
}

CosEventChannelAdmin::ProxyPullSupplier_ptr
CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPullSupplier_Default_Proxy_Factory::create_proxy (
    ::CosEventChannelAdmin::ProxyPullSupplier_ptr proxy,
    CORBA::Environment &
  )
{
  return proxy;
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPullSupplier_Proxy_Factory_Adapter::TAO_CosEventChannelAdmin_ProxyPullSupplier_Proxy_Factory_Adapter (void)
   : proxy_factory_ (0),
     delete_proxy_factory_ (0)
{
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPullSupplier_Proxy_Factory_Adapter::~TAO_CosEventChannelAdmin_ProxyPullSupplier_Proxy_Factory_Adapter (void)
{
  // Making sure the factory which the adapter has is destroyed with it.
  if (this->proxy_factory_ != 0)
    delete this->proxy_factory_;
}

int
CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPullSupplier_Proxy_Factory_Adapter::register_proxy_factory (
  TAO_CosEventChannelAdmin_ProxyPullSupplier_Default_Proxy_Factory *df,
     CORBA::Environment &ACE_TRY_ENV
      )
{
  ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
    this->lock_, 0));
  // Remove any existing <proxy_factory_> and replace with the new one.
  this->unregister_proxy_factory (ACE_TRY_ENV);
  this->proxy_factory_ = df;
  this->delete_proxy_factory_ = 0;
return 0;
}

int
CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPullSupplier_Proxy_Factory_Adapter::unregister_proxy_factory (
  CORBA::Environment &
    )
{
  ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
    this->lock_, 0));
  if (this->delete_proxy_factory_ == 0 && this->proxy_factory_ != 0)
    {
      // Its necessary to set <delete_proxy_factory_> to 1 to make sure that it
      // doesnt get into an infinite loop in <unregister_proxy_factory> as it is 
      // invoked in the destructor of the class too.
      this->delete_proxy_factory_ = 1;
      delete this->proxy_factory_;
      this->proxy_factory_ = 0;
    }
return 0;
}

CosEventChannelAdmin::ProxyPullSupplier_ptr
CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPullSupplier_Proxy_Factory_Adapter::create_proxy (
    ::CosEventChannelAdmin::ProxyPullSupplier_ptr proxy,
    CORBA::Environment &
  )
{
  ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
    this->lock_, 0));
  // Verify that an <proxy_factory_> is available else make one.
  if (this->proxy_factory_ == 0)
    ACE_NEW_RETURN (this->proxy_factory_,
        TAO_CosEventChannelAdmin_ProxyPullSupplier_Default_Proxy_Factory (1), 
         0);
      
    
  return this->proxy_factory_->create_proxy (proxy);
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPullSupplier_Smart_Proxy_Base::TAO_CosEventChannelAdmin_ProxyPullSupplier_Smart_Proxy_Base (::CosEventChannelAdmin::ProxyPullSupplier_ptr proxy)
: base_proxy_ (proxy)
{
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPullSupplier_Smart_Proxy_Base::~TAO_CosEventChannelAdmin_ProxyPullSupplier_Smart_Proxy_Base (void)
{
}

void CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPullSupplier_Smart_Proxy_Base::connect_pull_consumer  (
    CosEventComm::PullConsumer_ptr pull_consumer,
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    CosEventChannelAdmin::AlreadyConnected
  ))
{
  this->base_proxy_->connect_pull_consumer (
      pull_consumer,
      ACE_TRY_ENV
    );

}

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
  defined (ACE_HAS_GNU_REPO)
template class ACE_Singleton<CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPullSupplier_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#pragma instantiate ACE_Singleton<CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPullSupplier_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

static const CORBA::Long _oc_CosEventChannelAdmin_ProxyPullSupplier[] =
{
  TAO_ENCAP_BYTE_ORDER, // byte order
  55, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x436f7345), ACE_NTOHL (0x76656e74), ACE_NTOHL (0x4368616e), ACE_NTOHL (0x6e656c41), ACE_NTOHL (0x646d696e), ACE_NTOHL (0x2f50726f), ACE_NTOHL (0x78795075), ACE_NTOHL (0x6c6c5375), ACE_NTOHL (0x70706c69), ACE_NTOHL (0x65723a31), ACE_NTOHL (0x2e300000),  // repository ID = IDL:omg.org/CosEventChannelAdmin/ProxyPullSupplier:1.0
  18, ACE_NTOHL (0x50726f78), ACE_NTOHL (0x7950756c), ACE_NTOHL (0x6c537570), ACE_NTOHL (0x706c6965), ACE_NTOHL (0x72000000),  // name = ProxyPullSupplier
};
static CORBA::TypeCode _tc_TAO_tc_CosEventChannelAdmin_ProxyPullSupplier (CORBA::tk_objref, sizeof (_oc_CosEventChannelAdmin_ProxyPullSupplier), (char *) &_oc_CosEventChannelAdmin_ProxyPullSupplier, 0, sizeof (CosEventChannelAdmin::ProxyPullSupplier));
TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
TAO_NAMESPACE_BEGIN (CosEventChannelAdmin)
TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_ProxyPullSupplier, &_tc_TAO_tc_CosEventChannelAdmin_ProxyPullSupplier)
TAO_NAMESPACE_END
CosEventChannelAdmin::ProxyPullConsumer_ptr CosEventChannelAdmin::ProxyPullConsumer::_narrow (
    CORBA::Object_ptr obj,
    CORBA::Environment &ACE_TRY_ENV
  )
{
  if (CORBA::is_nil (obj))
    return ProxyPullConsumer::_nil ();
  CORBA::Boolean is_a = obj->_is_a ("IDL:omg.org/CosEventChannelAdmin/ProxyPullConsumer:1.0", ACE_TRY_ENV);
  ACE_CHECK_RETURN (ProxyPullConsumer::_nil ());
  if (is_a == 0)
    return ProxyPullConsumer::_nil ();
  return ProxyPullConsumer::_unchecked_narrow (obj, ACE_TRY_ENV);
}

CosEventChannelAdmin::ProxyPullConsumer_ptr CosEventChannelAdmin::ProxyPullConsumer::_unchecked_narrow (
    CORBA::Object_ptr obj,
    CORBA::Environment &
  )
{
  if (CORBA::is_nil (obj))
    return ProxyPullConsumer::_nil ();
  TAO_Stub* stub = obj->_stubobj ();
  stub->_incr_refcnt ();
  ProxyPullConsumer_ptr default_proxy = ProxyPullConsumer::_nil ();
  if (obj->_is_collocated () && _TAO_collocation_CosEventChannelAdmin_ProxyPullConsumer_Stub_Factory_function_pointer != 0)
    {
      default_proxy = _TAO_collocation_CosEventChannelAdmin_ProxyPullConsumer_Stub_Factory_function_pointer (obj);
    }
  if (CORBA::is_nil (default_proxy))
    ACE_NEW_RETURN (default_proxy, ProxyPullConsumer (stub), ProxyPullConsumer::_nil ());
  return TAO_CosEventChannelAdmin_ProxyPullConsumer_PROXY_FACTORY_ADAPTER::instance ()->create_proxy (default_proxy);
}

CosEventChannelAdmin::ProxyPullConsumer_ptr 
CosEventChannelAdmin::ProxyPullConsumer::_duplicate (ProxyPullConsumer_ptr obj)
{
  if (!CORBA::is_nil (obj))
    obj->_incr_refcnt ();
  return obj;
}

void CosEventChannelAdmin::ProxyPullConsumer::connect_pull_supplier (
    CosEventComm::PullSupplier_ptr pull_supplier,
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    CosEventChannelAdmin::AlreadyConnected,
    CosEventChannelAdmin::TypeError
  ))
{
  
  static TAO_Exception_Data _tao_CosEventChannelAdmin_ProxyPullConsumer_connect_pull_supplier_exceptiondata [] = 
  {
    {CosEventChannelAdmin::_tc_AlreadyConnected, CosEventChannelAdmin::AlreadyConnected::_alloc},
    {CosEventChannelAdmin::_tc_TypeError, CosEventChannelAdmin::TypeError::_alloc}
  };


  
  
  TAO_Stub *istub = this->_stubobj ();
  if (istub == 0)
    ACE_THROW (CORBA::INTERNAL ());

  
  TAO_GIOP_Twoway_Invocation _tao_call (
      istub,
      "connect_pull_supplier",
      21,
      istub->orb_core ()
    );

#if defined (TAO_HAS_INTERCEPTORS)
    TAO_ClientRequestInterceptor_Adapter
      _tao_vfr (istub->orb_core ()->orb ()->_get_client_interceptor (ACE_TRY_ENV));
    ACE_CHECK;
    PortableInterceptor::Cookies _tao_cookies;
    CORBA::NVList_var _tao_interceptor_args;
    if (_tao_vfr.valid ())
      {
        istub->orb_core ()->orb ()->create_list (0, _tao_interceptor_args.inout (), ACE_TRY_ENV);
        ACE_CHECK;
      }

    ACE_TRY
      {
#endif /* TAO_HAS_INTERCEPTORS */

      for (;;)
      {
        _tao_call.start (ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK;

        TAO_INTERCEPTOR (
            _tao_vfr.preinvoke (
                _tao_call.request_id (),
                1,
                this,
                "connect_pull_supplier",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK;
        CORBA::Short flag = 131;
        // Tremporary hack until GIOP 1.2 is implemented.
        
        _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK;

        TAO_OutputCDR &_tao_out = _tao_call.out_stream ();
        if (!(
              (_tao_out << pull_supplier)
          ))
          TAO_INTERCEPTOR_THROW (CORBA::MARSHAL ());
        int _invoke_status =
          _tao_call.invoke (_tao_CosEventChannelAdmin_ProxyPullConsumer_connect_pull_supplier_exceptiondata, 2, ACE_TRY_ENV);
                TAO_INTERCEPTOR_CHECK;

        if (_invoke_status == TAO_INVOKE_RESTART)
          continue;
        if (_invoke_status != TAO_INVOKE_OK)
        {
          TAO_INTERCEPTOR_THROW (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES));
        }
        
        TAO_INTERCEPTOR (
            _tao_vfr.postinvoke (
                _tao_call.request_id (),
                1,
                this,
                "connect_pull_supplier",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK;
        break;
        
      }
#if defined (TAO_HAS_INTERCEPTORS)
      
    }
  ACE_CATCHANY
    {
      _tao_vfr.exception_occurred (
          _tao_call.request_id (),
          1,
          this,
          "connect_pull_supplier",
          _tao_cookies,
          ACE_TRY_ENV
        );
      ACE_RETHROW;
    }
  ACE_ENDTRY;
  ACE_CHECK;
#endif /* TAO_HAS_INTERCEPTORS */

}

CORBA::Boolean CosEventChannelAdmin::ProxyPullConsumer::_is_a (const CORBA::Char *value, CORBA::Environment &ACE_TRY_ENV)
{
  if (
    (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CosEventChannelAdmin/ProxyPullConsumer:1.0")) ||
    (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CosEventComm/PullConsumer:1.0")) ||
    (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CORBA/Object:1.0")))
  return 1; // success using local knowledge
  else
    return this->CORBA_Object::_is_a (value, ACE_TRY_ENV);
}

const char* CosEventChannelAdmin::ProxyPullConsumer::_interface_repository_id (void) const
{
  return "IDL:omg.org/CosEventChannelAdmin/ProxyPullConsumer:1.0";
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPullConsumer_Default_Proxy_Factory::TAO_CosEventChannelAdmin_ProxyPullConsumer_Default_Proxy_Factory (int register_proxy_factory)
{
  if (register_proxy_factory)
    {
      TAO_CosEventChannelAdmin_ProxyPullConsumer_PROXY_FACTORY_ADAPTER::instance ()->register_proxy_factory (this);
    }
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPullConsumer_Default_Proxy_Factory::~TAO_CosEventChannelAdmin_ProxyPullConsumer_Default_Proxy_Factory (void)
{
}

CosEventChannelAdmin::ProxyPullConsumer_ptr
CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPullConsumer_Default_Proxy_Factory::create_proxy (
    ::CosEventChannelAdmin::ProxyPullConsumer_ptr proxy,
    CORBA::Environment &
  )
{
  return proxy;
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPullConsumer_Proxy_Factory_Adapter::TAO_CosEventChannelAdmin_ProxyPullConsumer_Proxy_Factory_Adapter (void)
   : proxy_factory_ (0),
     delete_proxy_factory_ (0)
{
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPullConsumer_Proxy_Factory_Adapter::~TAO_CosEventChannelAdmin_ProxyPullConsumer_Proxy_Factory_Adapter (void)
{
  // Making sure the factory which the adapter has is destroyed with it.
  if (this->proxy_factory_ != 0)
    delete this->proxy_factory_;
}

int
CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPullConsumer_Proxy_Factory_Adapter::register_proxy_factory (
  TAO_CosEventChannelAdmin_ProxyPullConsumer_Default_Proxy_Factory *df,
     CORBA::Environment &ACE_TRY_ENV
      )
{
  ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
    this->lock_, 0));
  // Remove any existing <proxy_factory_> and replace with the new one.
  this->unregister_proxy_factory (ACE_TRY_ENV);
  this->proxy_factory_ = df;
  this->delete_proxy_factory_ = 0;
return 0;
}

int
CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPullConsumer_Proxy_Factory_Adapter::unregister_proxy_factory (
  CORBA::Environment &
    )
{
  ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
    this->lock_, 0));
  if (this->delete_proxy_factory_ == 0 && this->proxy_factory_ != 0)
    {
      // Its necessary to set <delete_proxy_factory_> to 1 to make sure that it
      // doesnt get into an infinite loop in <unregister_proxy_factory> as it is 
      // invoked in the destructor of the class too.
      this->delete_proxy_factory_ = 1;
      delete this->proxy_factory_;
      this->proxy_factory_ = 0;
    }
return 0;
}

CosEventChannelAdmin::ProxyPullConsumer_ptr
CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPullConsumer_Proxy_Factory_Adapter::create_proxy (
    ::CosEventChannelAdmin::ProxyPullConsumer_ptr proxy,
    CORBA::Environment &
  )
{
  ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
    this->lock_, 0));
  // Verify that an <proxy_factory_> is available else make one.
  if (this->proxy_factory_ == 0)
    ACE_NEW_RETURN (this->proxy_factory_,
        TAO_CosEventChannelAdmin_ProxyPullConsumer_Default_Proxy_Factory (1), 
         0);
      
    
  return this->proxy_factory_->create_proxy (proxy);
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPullConsumer_Smart_Proxy_Base::TAO_CosEventChannelAdmin_ProxyPullConsumer_Smart_Proxy_Base (::CosEventChannelAdmin::ProxyPullConsumer_ptr proxy)
: base_proxy_ (proxy)
{
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPullConsumer_Smart_Proxy_Base::~TAO_CosEventChannelAdmin_ProxyPullConsumer_Smart_Proxy_Base (void)
{
}

void CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPullConsumer_Smart_Proxy_Base::connect_pull_supplier  (
    CosEventComm::PullSupplier_ptr pull_supplier,
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    CosEventChannelAdmin::AlreadyConnected,
    CosEventChannelAdmin::TypeError
  ))
{
  this->base_proxy_->connect_pull_supplier (
      pull_supplier,
      ACE_TRY_ENV
    );

}

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
  defined (ACE_HAS_GNU_REPO)
template class ACE_Singleton<CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPullConsumer_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#pragma instantiate ACE_Singleton<CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPullConsumer_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

static const CORBA::Long _oc_CosEventChannelAdmin_ProxyPullConsumer[] =
{
  TAO_ENCAP_BYTE_ORDER, // byte order
  55, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x436f7345), ACE_NTOHL (0x76656e74), ACE_NTOHL (0x4368616e), ACE_NTOHL (0x6e656c41), ACE_NTOHL (0x646d696e), ACE_NTOHL (0x2f50726f), ACE_NTOHL (0x78795075), ACE_NTOHL (0x6c6c436f), ACE_NTOHL (0x6e73756d), ACE_NTOHL (0x65723a31), ACE_NTOHL (0x2e300000),  // repository ID = IDL:omg.org/CosEventChannelAdmin/ProxyPullConsumer:1.0
  18, ACE_NTOHL (0x50726f78), ACE_NTOHL (0x7950756c), ACE_NTOHL (0x6c436f6e), ACE_NTOHL (0x73756d65), ACE_NTOHL (0x72000000),  // name = ProxyPullConsumer
};
static CORBA::TypeCode _tc_TAO_tc_CosEventChannelAdmin_ProxyPullConsumer (CORBA::tk_objref, sizeof (_oc_CosEventChannelAdmin_ProxyPullConsumer), (char *) &_oc_CosEventChannelAdmin_ProxyPullConsumer, 0, sizeof (CosEventChannelAdmin::ProxyPullConsumer));
TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
TAO_NAMESPACE_BEGIN (CosEventChannelAdmin)
TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_ProxyPullConsumer, &_tc_TAO_tc_CosEventChannelAdmin_ProxyPullConsumer)
TAO_NAMESPACE_END
CosEventChannelAdmin::ProxyPushSupplier_ptr CosEventChannelAdmin::ProxyPushSupplier::_narrow (
    CORBA::Object_ptr obj,
    CORBA::Environment &ACE_TRY_ENV
  )
{
  if (CORBA::is_nil (obj))
    return ProxyPushSupplier::_nil ();
  CORBA::Boolean is_a = obj->_is_a ("IDL:omg.org/CosEventChannelAdmin/ProxyPushSupplier:1.0", ACE_TRY_ENV);
  ACE_CHECK_RETURN (ProxyPushSupplier::_nil ());
  if (is_a == 0)
    return ProxyPushSupplier::_nil ();
  return ProxyPushSupplier::_unchecked_narrow (obj, ACE_TRY_ENV);
}

CosEventChannelAdmin::ProxyPushSupplier_ptr CosEventChannelAdmin::ProxyPushSupplier::_unchecked_narrow (
    CORBA::Object_ptr obj,
    CORBA::Environment &
  )
{
  if (CORBA::is_nil (obj))
    return ProxyPushSupplier::_nil ();
  TAO_Stub* stub = obj->_stubobj ();
  stub->_incr_refcnt ();
  ProxyPushSupplier_ptr default_proxy = ProxyPushSupplier::_nil ();
  if (obj->_is_collocated () && _TAO_collocation_CosEventChannelAdmin_ProxyPushSupplier_Stub_Factory_function_pointer != 0)
    {
      default_proxy = _TAO_collocation_CosEventChannelAdmin_ProxyPushSupplier_Stub_Factory_function_pointer (obj);
    }
  if (CORBA::is_nil (default_proxy))
    ACE_NEW_RETURN (default_proxy, ProxyPushSupplier (stub), ProxyPushSupplier::_nil ());
  return TAO_CosEventChannelAdmin_ProxyPushSupplier_PROXY_FACTORY_ADAPTER::instance ()->create_proxy (default_proxy);
}

CosEventChannelAdmin::ProxyPushSupplier_ptr 
CosEventChannelAdmin::ProxyPushSupplier::_duplicate (ProxyPushSupplier_ptr obj)
{
  if (!CORBA::is_nil (obj))
    obj->_incr_refcnt ();
  return obj;
}

void CosEventChannelAdmin::ProxyPushSupplier::connect_push_consumer (
    CosEventComm::PushConsumer_ptr push_consumer,
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    CosEventChannelAdmin::AlreadyConnected,
    CosEventChannelAdmin::TypeError
  ))
{
  
  static TAO_Exception_Data _tao_CosEventChannelAdmin_ProxyPushSupplier_connect_push_consumer_exceptiondata [] = 
  {
    {CosEventChannelAdmin::_tc_AlreadyConnected, CosEventChannelAdmin::AlreadyConnected::_alloc},
    {CosEventChannelAdmin::_tc_TypeError, CosEventChannelAdmin::TypeError::_alloc}
  };


  
  
  TAO_Stub *istub = this->_stubobj ();
  if (istub == 0)
    ACE_THROW (CORBA::INTERNAL ());

  
  TAO_GIOP_Twoway_Invocation _tao_call (
      istub,
      "connect_push_consumer",
      21,
      istub->orb_core ()
    );

#if defined (TAO_HAS_INTERCEPTORS)
    TAO_ClientRequestInterceptor_Adapter
      _tao_vfr (istub->orb_core ()->orb ()->_get_client_interceptor (ACE_TRY_ENV));
    ACE_CHECK;
    PortableInterceptor::Cookies _tao_cookies;
    CORBA::NVList_var _tao_interceptor_args;
    if (_tao_vfr.valid ())
      {
        istub->orb_core ()->orb ()->create_list (0, _tao_interceptor_args.inout (), ACE_TRY_ENV);
        ACE_CHECK;
      }

    ACE_TRY
      {
#endif /* TAO_HAS_INTERCEPTORS */

      for (;;)
      {
        _tao_call.start (ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK;

        TAO_INTERCEPTOR (
            _tao_vfr.preinvoke (
                _tao_call.request_id (),
                1,
                this,
                "connect_push_consumer",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK;
        CORBA::Short flag = 131;
        // Tremporary hack until GIOP 1.2 is implemented.
        
        _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK;

        TAO_OutputCDR &_tao_out = _tao_call.out_stream ();
        if (!(
              (_tao_out << push_consumer)
          ))
          TAO_INTERCEPTOR_THROW (CORBA::MARSHAL ());
        int _invoke_status =
          _tao_call.invoke (_tao_CosEventChannelAdmin_ProxyPushSupplier_connect_push_consumer_exceptiondata, 2, ACE_TRY_ENV);
                TAO_INTERCEPTOR_CHECK;

        if (_invoke_status == TAO_INVOKE_RESTART)
          continue;
        if (_invoke_status != TAO_INVOKE_OK)
        {
          TAO_INTERCEPTOR_THROW (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES));
        }
        
        TAO_INTERCEPTOR (
            _tao_vfr.postinvoke (
                _tao_call.request_id (),
                1,
                this,
                "connect_push_consumer",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK;
        break;
        
      }
#if defined (TAO_HAS_INTERCEPTORS)
      
    }
  ACE_CATCHANY
    {
      _tao_vfr.exception_occurred (
          _tao_call.request_id (),
          1,
          this,
          "connect_push_consumer",
          _tao_cookies,
          ACE_TRY_ENV
        );
      ACE_RETHROW;
    }
  ACE_ENDTRY;
  ACE_CHECK;
#endif /* TAO_HAS_INTERCEPTORS */

}

CORBA::Boolean CosEventChannelAdmin::ProxyPushSupplier::_is_a (const CORBA::Char *value, CORBA::Environment &ACE_TRY_ENV)
{
  if (
    (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CosEventChannelAdmin/ProxyPushSupplier:1.0")) ||
    (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CosEventComm/PushSupplier:1.0")) ||
    (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CORBA/Object:1.0")))
  return 1; // success using local knowledge
  else
    return this->CORBA_Object::_is_a (value, ACE_TRY_ENV);
}

const char* CosEventChannelAdmin::ProxyPushSupplier::_interface_repository_id (void) const
{
  return "IDL:omg.org/CosEventChannelAdmin/ProxyPushSupplier:1.0";
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPushSupplier_Default_Proxy_Factory::TAO_CosEventChannelAdmin_ProxyPushSupplier_Default_Proxy_Factory (int register_proxy_factory)
{
  if (register_proxy_factory)
    {
      TAO_CosEventChannelAdmin_ProxyPushSupplier_PROXY_FACTORY_ADAPTER::instance ()->register_proxy_factory (this);
    }
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPushSupplier_Default_Proxy_Factory::~TAO_CosEventChannelAdmin_ProxyPushSupplier_Default_Proxy_Factory (void)
{
}

CosEventChannelAdmin::ProxyPushSupplier_ptr
CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPushSupplier_Default_Proxy_Factory::create_proxy (
    ::CosEventChannelAdmin::ProxyPushSupplier_ptr proxy,
    CORBA::Environment &
  )
{
  return proxy;
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPushSupplier_Proxy_Factory_Adapter::TAO_CosEventChannelAdmin_ProxyPushSupplier_Proxy_Factory_Adapter (void)
   : proxy_factory_ (0),
     delete_proxy_factory_ (0)
{
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPushSupplier_Proxy_Factory_Adapter::~TAO_CosEventChannelAdmin_ProxyPushSupplier_Proxy_Factory_Adapter (void)
{
  // Making sure the factory which the adapter has is destroyed with it.
  if (this->proxy_factory_ != 0)
    delete this->proxy_factory_;
}

int
CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPushSupplier_Proxy_Factory_Adapter::register_proxy_factory (
  TAO_CosEventChannelAdmin_ProxyPushSupplier_Default_Proxy_Factory *df,
     CORBA::Environment &ACE_TRY_ENV
      )
{
  ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
    this->lock_, 0));
  // Remove any existing <proxy_factory_> and replace with the new one.
  this->unregister_proxy_factory (ACE_TRY_ENV);
  this->proxy_factory_ = df;
  this->delete_proxy_factory_ = 0;
return 0;
}

int
CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPushSupplier_Proxy_Factory_Adapter::unregister_proxy_factory (
  CORBA::Environment &
    )
{
  ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
    this->lock_, 0));
  if (this->delete_proxy_factory_ == 0 && this->proxy_factory_ != 0)
    {
      // Its necessary to set <delete_proxy_factory_> to 1 to make sure that it
      // doesnt get into an infinite loop in <unregister_proxy_factory> as it is 
      // invoked in the destructor of the class too.
      this->delete_proxy_factory_ = 1;
      delete this->proxy_factory_;
      this->proxy_factory_ = 0;
    }
return 0;
}

CosEventChannelAdmin::ProxyPushSupplier_ptr
CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPushSupplier_Proxy_Factory_Adapter::create_proxy (
    ::CosEventChannelAdmin::ProxyPushSupplier_ptr proxy,
    CORBA::Environment &
  )
{
  ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
    this->lock_, 0));
  // Verify that an <proxy_factory_> is available else make one.
  if (this->proxy_factory_ == 0)
    ACE_NEW_RETURN (this->proxy_factory_,
        TAO_CosEventChannelAdmin_ProxyPushSupplier_Default_Proxy_Factory (1), 
         0);
      
    
  return this->proxy_factory_->create_proxy (proxy);
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPushSupplier_Smart_Proxy_Base::TAO_CosEventChannelAdmin_ProxyPushSupplier_Smart_Proxy_Base (::CosEventChannelAdmin::ProxyPushSupplier_ptr proxy)
: base_proxy_ (proxy)
{
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPushSupplier_Smart_Proxy_Base::~TAO_CosEventChannelAdmin_ProxyPushSupplier_Smart_Proxy_Base (void)
{
}

void CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPushSupplier_Smart_Proxy_Base::connect_push_consumer  (
    CosEventComm::PushConsumer_ptr push_consumer,
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    CosEventChannelAdmin::AlreadyConnected,
    CosEventChannelAdmin::TypeError
  ))
{
  this->base_proxy_->connect_push_consumer (
      push_consumer,
      ACE_TRY_ENV
    );

}

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
  defined (ACE_HAS_GNU_REPO)
template class ACE_Singleton<CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPushSupplier_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#pragma instantiate ACE_Singleton<CosEventChannelAdmin::TAO_CosEventChannelAdmin_ProxyPushSupplier_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

static const CORBA::Long _oc_CosEventChannelAdmin_ProxyPushSupplier[] =
{
  TAO_ENCAP_BYTE_ORDER, // byte order
  55, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x436f7345), ACE_NTOHL (0x76656e74), ACE_NTOHL (0x4368616e), ACE_NTOHL (0x6e656c41), ACE_NTOHL (0x646d696e), ACE_NTOHL (0x2f50726f), ACE_NTOHL (0x78795075), ACE_NTOHL (0x73685375), ACE_NTOHL (0x70706c69), ACE_NTOHL (0x65723a31), ACE_NTOHL (0x2e300000),  // repository ID = IDL:omg.org/CosEventChannelAdmin/ProxyPushSupplier:1.0
  18, ACE_NTOHL (0x50726f78), ACE_NTOHL (0x79507573), ACE_NTOHL (0x68537570), ACE_NTOHL (0x706c6965), ACE_NTOHL (0x72000000),  // name = ProxyPushSupplier
};
static CORBA::TypeCode _tc_TAO_tc_CosEventChannelAdmin_ProxyPushSupplier (CORBA::tk_objref, sizeof (_oc_CosEventChannelAdmin_ProxyPushSupplier), (char *) &_oc_CosEventChannelAdmin_ProxyPushSupplier, 0, sizeof (CosEventChannelAdmin::ProxyPushSupplier));
TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
TAO_NAMESPACE_BEGIN (CosEventChannelAdmin)
TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_ProxyPushSupplier, &_tc_TAO_tc_CosEventChannelAdmin_ProxyPushSupplier)
TAO_NAMESPACE_END
CosEventChannelAdmin::ConsumerAdmin_ptr CosEventChannelAdmin::ConsumerAdmin::_narrow (
    CORBA::Object_ptr obj,
    CORBA::Environment &ACE_TRY_ENV
  )
{
  if (CORBA::is_nil (obj))
    return ConsumerAdmin::_nil ();
  CORBA::Boolean is_a = obj->_is_a ("IDL:omg.org/CosEventChannelAdmin/ConsumerAdmin:1.0", ACE_TRY_ENV);
  ACE_CHECK_RETURN (ConsumerAdmin::_nil ());
  if (is_a == 0)
    return ConsumerAdmin::_nil ();
  return ConsumerAdmin::_unchecked_narrow (obj, ACE_TRY_ENV);
}

CosEventChannelAdmin::ConsumerAdmin_ptr CosEventChannelAdmin::ConsumerAdmin::_unchecked_narrow (
    CORBA::Object_ptr obj,
    CORBA::Environment &
  )
{
  if (CORBA::is_nil (obj))
    return ConsumerAdmin::_nil ();
  TAO_Stub* stub = obj->_stubobj ();
  stub->_incr_refcnt ();
  ConsumerAdmin_ptr default_proxy = ConsumerAdmin::_nil ();
  if (obj->_is_collocated () && _TAO_collocation_CosEventChannelAdmin_ConsumerAdmin_Stub_Factory_function_pointer != 0)
    {
      default_proxy = _TAO_collocation_CosEventChannelAdmin_ConsumerAdmin_Stub_Factory_function_pointer (obj);
    }
  if (CORBA::is_nil (default_proxy))
    ACE_NEW_RETURN (default_proxy, ConsumerAdmin (stub), ConsumerAdmin::_nil ());
  return TAO_CosEventChannelAdmin_ConsumerAdmin_PROXY_FACTORY_ADAPTER::instance ()->create_proxy (default_proxy);
}

CosEventChannelAdmin::ConsumerAdmin_ptr 
CosEventChannelAdmin::ConsumerAdmin::_duplicate (ConsumerAdmin_ptr obj)
{
  if (!CORBA::is_nil (obj))
    obj->_incr_refcnt ();
  return obj;
}

CosEventChannelAdmin::ProxyPushSupplier_ptr CosEventChannelAdmin::ConsumerAdmin::obtain_push_supplier (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
{
  
  CosEventChannelAdmin::ProxyPushSupplier_ptr _tao_retval = CosEventChannelAdmin::ProxyPushSupplier::_nil ();
  CosEventChannelAdmin::ProxyPushSupplier_var _tao_safe_retval (_tao_retval);
  
  
  TAO_Stub *istub = this->_stubobj ();
  if (istub == 0)
    ACE_THROW_RETURN (CORBA::INTERNAL (), 0);

  
  TAO_GIOP_Twoway_Invocation _tao_call (
      istub,
      "obtain_push_supplier",
      20,
      istub->orb_core ()
    );

#if defined (TAO_HAS_INTERCEPTORS)
    TAO_ClientRequestInterceptor_Adapter
      _tao_vfr (istub->orb_core ()->orb ()->_get_client_interceptor (ACE_TRY_ENV));
    ACE_CHECK_RETURN (0);
    PortableInterceptor::Cookies _tao_cookies;
    CORBA::NVList_var _tao_interceptor_args;
    if (_tao_vfr.valid ())
      {
        istub->orb_core ()->orb ()->create_list (0, _tao_interceptor_args.inout (), ACE_TRY_ENV);
        ACE_CHECK_RETURN (0);
      }

    ACE_TRY
      {
#endif /* TAO_HAS_INTERCEPTORS */

      for (;;)
      {
        _tao_call.start (ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK_RETURN (0);

        TAO_INTERCEPTOR (
            _tao_vfr.preinvoke (
                _tao_call.request_id (),
                1,
                this,
                "obtain_push_supplier",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK_RETURN (0);
        CORBA::Short flag = 131;
        // Tremporary hack until GIOP 1.2 is implemented.
        
        _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK_RETURN (0);

        int _invoke_status =
          _tao_call.invoke (0, 0, ACE_TRY_ENV);
                TAO_INTERCEPTOR_CHECK_RETURN (0);

        if (_invoke_status == TAO_INVOKE_RESTART)
          continue;
        if (_invoke_status != TAO_INVOKE_OK)
        {
          TAO_INTERCEPTOR_THROW_RETURN (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES), 0);

        }
        TAO_InputCDR &_tao_in = _tao_call.inp_stream ();
        if (!(
              (_tao_in >> _tao_safe_retval.inout ())
          ))
          TAO_INTERCEPTOR_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES), 0);

        TAO_INTERCEPTOR (
            _tao_vfr.postinvoke (
                _tao_call.request_id (),
                1,
                this,
                "obtain_push_supplier",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK_RETURN (0);
        break;
        
      }
#if defined (TAO_HAS_INTERCEPTORS)
      
    }
  ACE_CATCHANY
    {
      _tao_vfr.exception_occurred (
          _tao_call.request_id (),
          1,
          this,
          "obtain_push_supplier",
          _tao_cookies,
          ACE_TRY_ENV
        );
      ACE_RETHROW;
    }
  ACE_ENDTRY;
  ACE_CHECK_RETURN (0);
#endif /* TAO_HAS_INTERCEPTORS */
  return _tao_safe_retval._retn ();
}

CosEventChannelAdmin::ProxyPullSupplier_ptr CosEventChannelAdmin::ConsumerAdmin::obtain_pull_supplier (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
{
  
  CosEventChannelAdmin::ProxyPullSupplier_ptr _tao_retval = CosEventChannelAdmin::ProxyPullSupplier::_nil ();
  CosEventChannelAdmin::ProxyPullSupplier_var _tao_safe_retval (_tao_retval);
  
  
  TAO_Stub *istub = this->_stubobj ();
  if (istub == 0)
    ACE_THROW_RETURN (CORBA::INTERNAL (), 0);

  
  TAO_GIOP_Twoway_Invocation _tao_call (
      istub,
      "obtain_pull_supplier",
      20,
      istub->orb_core ()
    );

#if defined (TAO_HAS_INTERCEPTORS)
    TAO_ClientRequestInterceptor_Adapter
      _tao_vfr (istub->orb_core ()->orb ()->_get_client_interceptor (ACE_TRY_ENV));
    ACE_CHECK_RETURN (0);
    PortableInterceptor::Cookies _tao_cookies;
    CORBA::NVList_var _tao_interceptor_args;
    if (_tao_vfr.valid ())
      {
        istub->orb_core ()->orb ()->create_list (0, _tao_interceptor_args.inout (), ACE_TRY_ENV);
        ACE_CHECK_RETURN (0);
      }

    ACE_TRY
      {
#endif /* TAO_HAS_INTERCEPTORS */

      for (;;)
      {
        _tao_call.start (ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK_RETURN (0);

        TAO_INTERCEPTOR (
            _tao_vfr.preinvoke (
                _tao_call.request_id (),
                1,
                this,
                "obtain_pull_supplier",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK_RETURN (0);
        CORBA::Short flag = 131;
        // Tremporary hack until GIOP 1.2 is implemented.
        
        _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK_RETURN (0);

        int _invoke_status =
          _tao_call.invoke (0, 0, ACE_TRY_ENV);
                TAO_INTERCEPTOR_CHECK_RETURN (0);

        if (_invoke_status == TAO_INVOKE_RESTART)
          continue;
        if (_invoke_status != TAO_INVOKE_OK)
        {
          TAO_INTERCEPTOR_THROW_RETURN (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES), 0);

        }
        TAO_InputCDR &_tao_in = _tao_call.inp_stream ();
        if (!(
              (_tao_in >> _tao_safe_retval.inout ())
          ))
          TAO_INTERCEPTOR_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES), 0);

        TAO_INTERCEPTOR (
            _tao_vfr.postinvoke (
                _tao_call.request_id (),
                1,
                this,
                "obtain_pull_supplier",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK_RETURN (0);
        break;
        
      }
#if defined (TAO_HAS_INTERCEPTORS)
      
    }
  ACE_CATCHANY
    {
      _tao_vfr.exception_occurred (
          _tao_call.request_id (),
          1,
          this,
          "obtain_pull_supplier",
          _tao_cookies,
          ACE_TRY_ENV
        );
      ACE_RETHROW;
    }
  ACE_ENDTRY;
  ACE_CHECK_RETURN (0);
#endif /* TAO_HAS_INTERCEPTORS */
  return _tao_safe_retval._retn ();
}

CORBA::Boolean CosEventChannelAdmin::ConsumerAdmin::_is_a (const CORBA::Char *value, CORBA::Environment &ACE_TRY_ENV)
{
  if (
    (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CosEventChannelAdmin/ConsumerAdmin:1.0")) ||
    (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CORBA/Object:1.0")))
  return 1; // success using local knowledge
  else
    return this->CORBA_Object::_is_a (value, ACE_TRY_ENV);
}

const char* CosEventChannelAdmin::ConsumerAdmin::_interface_repository_id (void) const
{
  return "IDL:omg.org/CosEventChannelAdmin/ConsumerAdmin:1.0";
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_ConsumerAdmin_Default_Proxy_Factory::TAO_CosEventChannelAdmin_ConsumerAdmin_Default_Proxy_Factory (int register_proxy_factory)
{
  if (register_proxy_factory)
    {
      TAO_CosEventChannelAdmin_ConsumerAdmin_PROXY_FACTORY_ADAPTER::instance ()->register_proxy_factory (this);
    }
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_ConsumerAdmin_Default_Proxy_Factory::~TAO_CosEventChannelAdmin_ConsumerAdmin_Default_Proxy_Factory (void)
{
}

CosEventChannelAdmin::ConsumerAdmin_ptr
CosEventChannelAdmin::TAO_CosEventChannelAdmin_ConsumerAdmin_Default_Proxy_Factory::create_proxy (
    ::CosEventChannelAdmin::ConsumerAdmin_ptr proxy,
    CORBA::Environment &
  )
{
  return proxy;
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_ConsumerAdmin_Proxy_Factory_Adapter::TAO_CosEventChannelAdmin_ConsumerAdmin_Proxy_Factory_Adapter (void)
   : proxy_factory_ (0),
     delete_proxy_factory_ (0)
{
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_ConsumerAdmin_Proxy_Factory_Adapter::~TAO_CosEventChannelAdmin_ConsumerAdmin_Proxy_Factory_Adapter (void)
{
  // Making sure the factory which the adapter has is destroyed with it.
  if (this->proxy_factory_ != 0)
    delete this->proxy_factory_;
}

int
CosEventChannelAdmin::TAO_CosEventChannelAdmin_ConsumerAdmin_Proxy_Factory_Adapter::register_proxy_factory (
  TAO_CosEventChannelAdmin_ConsumerAdmin_Default_Proxy_Factory *df,
     CORBA::Environment &ACE_TRY_ENV
      )
{
  ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
    this->lock_, 0));
  // Remove any existing <proxy_factory_> and replace with the new one.
  this->unregister_proxy_factory (ACE_TRY_ENV);
  this->proxy_factory_ = df;
  this->delete_proxy_factory_ = 0;
return 0;
}

int
CosEventChannelAdmin::TAO_CosEventChannelAdmin_ConsumerAdmin_Proxy_Factory_Adapter::unregister_proxy_factory (
  CORBA::Environment &
    )
{
  ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
    this->lock_, 0));
  if (this->delete_proxy_factory_ == 0 && this->proxy_factory_ != 0)
    {
      // Its necessary to set <delete_proxy_factory_> to 1 to make sure that it
      // doesnt get into an infinite loop in <unregister_proxy_factory> as it is 
      // invoked in the destructor of the class too.
      this->delete_proxy_factory_ = 1;
      delete this->proxy_factory_;
      this->proxy_factory_ = 0;
    }
return 0;
}

CosEventChannelAdmin::ConsumerAdmin_ptr
CosEventChannelAdmin::TAO_CosEventChannelAdmin_ConsumerAdmin_Proxy_Factory_Adapter::create_proxy (
    ::CosEventChannelAdmin::ConsumerAdmin_ptr proxy,
    CORBA::Environment &
  )
{
  ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
    this->lock_, 0));
  // Verify that an <proxy_factory_> is available else make one.
  if (this->proxy_factory_ == 0)
    ACE_NEW_RETURN (this->proxy_factory_,
        TAO_CosEventChannelAdmin_ConsumerAdmin_Default_Proxy_Factory (1), 
         0);
      
    
  return this->proxy_factory_->create_proxy (proxy);
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_ConsumerAdmin_Smart_Proxy_Base::TAO_CosEventChannelAdmin_ConsumerAdmin_Smart_Proxy_Base (::CosEventChannelAdmin::ConsumerAdmin_ptr proxy)
: base_proxy_ (proxy)
{
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_ConsumerAdmin_Smart_Proxy_Base::~TAO_CosEventChannelAdmin_ConsumerAdmin_Smart_Proxy_Base (void)
{
}

CosEventChannelAdmin::ProxyPushSupplier_ptr CosEventChannelAdmin::TAO_CosEventChannelAdmin_ConsumerAdmin_Smart_Proxy_Base::obtain_push_supplier  (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
{
  return this->base_proxy_->obtain_push_supplier (
      ACE_TRY_ENV
    );

}

CosEventChannelAdmin::ProxyPullSupplier_ptr CosEventChannelAdmin::TAO_CosEventChannelAdmin_ConsumerAdmin_Smart_Proxy_Base::obtain_pull_supplier  (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
{
  return this->base_proxy_->obtain_pull_supplier (
      ACE_TRY_ENV
    );

}

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
  defined (ACE_HAS_GNU_REPO)
template class ACE_Singleton<CosEventChannelAdmin::TAO_CosEventChannelAdmin_ConsumerAdmin_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#pragma instantiate ACE_Singleton<CosEventChannelAdmin::TAO_CosEventChannelAdmin_ConsumerAdmin_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

static const CORBA::Long _oc_CosEventChannelAdmin_ConsumerAdmin[] =
{
  TAO_ENCAP_BYTE_ORDER, // byte order
  51, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x436f7345), ACE_NTOHL (0x76656e74), ACE_NTOHL (0x4368616e), ACE_NTOHL (0x6e656c41), ACE_NTOHL (0x646d696e), ACE_NTOHL (0x2f436f6e), ACE_NTOHL (0x73756d65), ACE_NTOHL (0x7241646d), ACE_NTOHL (0x696e3a31), ACE_NTOHL (0x2e300000),  // repository ID = IDL:omg.org/CosEventChannelAdmin/ConsumerAdmin:1.0
  14, ACE_NTOHL (0x436f6e73), ACE_NTOHL (0x756d6572), ACE_NTOHL (0x41646d69), ACE_NTOHL (0x6e000000),  // name = ConsumerAdmin
};
static CORBA::TypeCode _tc_TAO_tc_CosEventChannelAdmin_ConsumerAdmin (CORBA::tk_objref, sizeof (_oc_CosEventChannelAdmin_ConsumerAdmin), (char *) &_oc_CosEventChannelAdmin_ConsumerAdmin, 0, sizeof (CosEventChannelAdmin::ConsumerAdmin));
TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
TAO_NAMESPACE_BEGIN (CosEventChannelAdmin)
TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_ConsumerAdmin, &_tc_TAO_tc_CosEventChannelAdmin_ConsumerAdmin)
TAO_NAMESPACE_END
CosEventChannelAdmin::SupplierAdmin_ptr CosEventChannelAdmin::SupplierAdmin::_narrow (
    CORBA::Object_ptr obj,
    CORBA::Environment &ACE_TRY_ENV
  )
{
  if (CORBA::is_nil (obj))
    return SupplierAdmin::_nil ();
  CORBA::Boolean is_a = obj->_is_a ("IDL:omg.org/CosEventChannelAdmin/SupplierAdmin:1.0", ACE_TRY_ENV);
  ACE_CHECK_RETURN (SupplierAdmin::_nil ());
  if (is_a == 0)
    return SupplierAdmin::_nil ();
  return SupplierAdmin::_unchecked_narrow (obj, ACE_TRY_ENV);
}

CosEventChannelAdmin::SupplierAdmin_ptr CosEventChannelAdmin::SupplierAdmin::_unchecked_narrow (
    CORBA::Object_ptr obj,
    CORBA::Environment &
  )
{
  if (CORBA::is_nil (obj))
    return SupplierAdmin::_nil ();
  TAO_Stub* stub = obj->_stubobj ();
  stub->_incr_refcnt ();
  SupplierAdmin_ptr default_proxy = SupplierAdmin::_nil ();
  if (obj->_is_collocated () && _TAO_collocation_CosEventChannelAdmin_SupplierAdmin_Stub_Factory_function_pointer != 0)
    {
      default_proxy = _TAO_collocation_CosEventChannelAdmin_SupplierAdmin_Stub_Factory_function_pointer (obj);
    }
  if (CORBA::is_nil (default_proxy))
    ACE_NEW_RETURN (default_proxy, SupplierAdmin (stub), SupplierAdmin::_nil ());
  return TAO_CosEventChannelAdmin_SupplierAdmin_PROXY_FACTORY_ADAPTER::instance ()->create_proxy (default_proxy);
}

CosEventChannelAdmin::SupplierAdmin_ptr 
CosEventChannelAdmin::SupplierAdmin::_duplicate (SupplierAdmin_ptr obj)
{
  if (!CORBA::is_nil (obj))
    obj->_incr_refcnt ();
  return obj;
}

CosEventChannelAdmin::ProxyPushConsumer_ptr CosEventChannelAdmin::SupplierAdmin::obtain_push_consumer (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
{
  
  CosEventChannelAdmin::ProxyPushConsumer_ptr _tao_retval = CosEventChannelAdmin::ProxyPushConsumer::_nil ();
  CosEventChannelAdmin::ProxyPushConsumer_var _tao_safe_retval (_tao_retval);
  
  
  TAO_Stub *istub = this->_stubobj ();
  if (istub == 0)
    ACE_THROW_RETURN (CORBA::INTERNAL (), 0);

  
  TAO_GIOP_Twoway_Invocation _tao_call (
      istub,
      "obtain_push_consumer",
      20,
      istub->orb_core ()
    );

#if defined (TAO_HAS_INTERCEPTORS)
    TAO_ClientRequestInterceptor_Adapter
      _tao_vfr (istub->orb_core ()->orb ()->_get_client_interceptor (ACE_TRY_ENV));
    ACE_CHECK_RETURN (0);
    PortableInterceptor::Cookies _tao_cookies;
    CORBA::NVList_var _tao_interceptor_args;
    if (_tao_vfr.valid ())
      {
        istub->orb_core ()->orb ()->create_list (0, _tao_interceptor_args.inout (), ACE_TRY_ENV);
        ACE_CHECK_RETURN (0);
      }

    ACE_TRY
      {
#endif /* TAO_HAS_INTERCEPTORS */

      for (;;)
      {
        _tao_call.start (ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK_RETURN (0);

        TAO_INTERCEPTOR (
            _tao_vfr.preinvoke (
                _tao_call.request_id (),
                1,
                this,
                "obtain_push_consumer",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK_RETURN (0);
        CORBA::Short flag = 131;
        // Tremporary hack until GIOP 1.2 is implemented.
        
        _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK_RETURN (0);

        int _invoke_status =
          _tao_call.invoke (0, 0, ACE_TRY_ENV);
                TAO_INTERCEPTOR_CHECK_RETURN (0);

        if (_invoke_status == TAO_INVOKE_RESTART)
          continue;
        if (_invoke_status != TAO_INVOKE_OK)
        {
          TAO_INTERCEPTOR_THROW_RETURN (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES), 0);

        }
        TAO_InputCDR &_tao_in = _tao_call.inp_stream ();
        if (!(
              (_tao_in >> _tao_safe_retval.inout ())
          ))
          TAO_INTERCEPTOR_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES), 0);

        TAO_INTERCEPTOR (
            _tao_vfr.postinvoke (
                _tao_call.request_id (),
                1,
                this,
                "obtain_push_consumer",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK_RETURN (0);
        break;
        
      }
#if defined (TAO_HAS_INTERCEPTORS)
      
    }
  ACE_CATCHANY
    {
      _tao_vfr.exception_occurred (
          _tao_call.request_id (),
          1,
          this,
          "obtain_push_consumer",
          _tao_cookies,
          ACE_TRY_ENV
        );
      ACE_RETHROW;
    }
  ACE_ENDTRY;
  ACE_CHECK_RETURN (0);
#endif /* TAO_HAS_INTERCEPTORS */
  return _tao_safe_retval._retn ();
}

CosEventChannelAdmin::ProxyPullConsumer_ptr CosEventChannelAdmin::SupplierAdmin::obtain_pull_consumer (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
{
  
  CosEventChannelAdmin::ProxyPullConsumer_ptr _tao_retval = CosEventChannelAdmin::ProxyPullConsumer::_nil ();
  CosEventChannelAdmin::ProxyPullConsumer_var _tao_safe_retval (_tao_retval);
  
  
  TAO_Stub *istub = this->_stubobj ();
  if (istub == 0)
    ACE_THROW_RETURN (CORBA::INTERNAL (), 0);

  
  TAO_GIOP_Twoway_Invocation _tao_call (
      istub,
      "obtain_pull_consumer",
      20,
      istub->orb_core ()
    );

#if defined (TAO_HAS_INTERCEPTORS)
    TAO_ClientRequestInterceptor_Adapter
      _tao_vfr (istub->orb_core ()->orb ()->_get_client_interceptor (ACE_TRY_ENV));
    ACE_CHECK_RETURN (0);
    PortableInterceptor::Cookies _tao_cookies;
    CORBA::NVList_var _tao_interceptor_args;
    if (_tao_vfr.valid ())
      {
        istub->orb_core ()->orb ()->create_list (0, _tao_interceptor_args.inout (), ACE_TRY_ENV);
        ACE_CHECK_RETURN (0);
      }

    ACE_TRY
      {
#endif /* TAO_HAS_INTERCEPTORS */

      for (;;)
      {
        _tao_call.start (ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK_RETURN (0);

        TAO_INTERCEPTOR (
            _tao_vfr.preinvoke (
                _tao_call.request_id (),
                1,
                this,
                "obtain_pull_consumer",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK_RETURN (0);
        CORBA::Short flag = 131;
        // Tremporary hack until GIOP 1.2 is implemented.
        
        _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK_RETURN (0);

        int _invoke_status =
          _tao_call.invoke (0, 0, ACE_TRY_ENV);
                TAO_INTERCEPTOR_CHECK_RETURN (0);

        if (_invoke_status == TAO_INVOKE_RESTART)
          continue;
        if (_invoke_status != TAO_INVOKE_OK)
        {
          TAO_INTERCEPTOR_THROW_RETURN (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES), 0);

        }
        TAO_InputCDR &_tao_in = _tao_call.inp_stream ();
        if (!(
              (_tao_in >> _tao_safe_retval.inout ())
          ))
          TAO_INTERCEPTOR_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES), 0);

        TAO_INTERCEPTOR (
            _tao_vfr.postinvoke (
                _tao_call.request_id (),
                1,
                this,
                "obtain_pull_consumer",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK_RETURN (0);
        break;
        
      }
#if defined (TAO_HAS_INTERCEPTORS)
      
    }
  ACE_CATCHANY
    {
      _tao_vfr.exception_occurred (
          _tao_call.request_id (),
          1,
          this,
          "obtain_pull_consumer",
          _tao_cookies,
          ACE_TRY_ENV
        );
      ACE_RETHROW;
    }
  ACE_ENDTRY;
  ACE_CHECK_RETURN (0);
#endif /* TAO_HAS_INTERCEPTORS */
  return _tao_safe_retval._retn ();
}

CORBA::Boolean CosEventChannelAdmin::SupplierAdmin::_is_a (const CORBA::Char *value, CORBA::Environment &ACE_TRY_ENV)
{
  if (
    (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CosEventChannelAdmin/SupplierAdmin:1.0")) ||
    (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CORBA/Object:1.0")))
  return 1; // success using local knowledge
  else
    return this->CORBA_Object::_is_a (value, ACE_TRY_ENV);
}

const char* CosEventChannelAdmin::SupplierAdmin::_interface_repository_id (void) const
{
  return "IDL:omg.org/CosEventChannelAdmin/SupplierAdmin:1.0";
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_SupplierAdmin_Default_Proxy_Factory::TAO_CosEventChannelAdmin_SupplierAdmin_Default_Proxy_Factory (int register_proxy_factory)
{
  if (register_proxy_factory)
    {
      TAO_CosEventChannelAdmin_SupplierAdmin_PROXY_FACTORY_ADAPTER::instance ()->register_proxy_factory (this);
    }
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_SupplierAdmin_Default_Proxy_Factory::~TAO_CosEventChannelAdmin_SupplierAdmin_Default_Proxy_Factory (void)
{
}

CosEventChannelAdmin::SupplierAdmin_ptr
CosEventChannelAdmin::TAO_CosEventChannelAdmin_SupplierAdmin_Default_Proxy_Factory::create_proxy (
    ::CosEventChannelAdmin::SupplierAdmin_ptr proxy,
    CORBA::Environment &
  )
{
  return proxy;
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_SupplierAdmin_Proxy_Factory_Adapter::TAO_CosEventChannelAdmin_SupplierAdmin_Proxy_Factory_Adapter (void)
   : proxy_factory_ (0),
     delete_proxy_factory_ (0)
{
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_SupplierAdmin_Proxy_Factory_Adapter::~TAO_CosEventChannelAdmin_SupplierAdmin_Proxy_Factory_Adapter (void)
{
  // Making sure the factory which the adapter has is destroyed with it.
  if (this->proxy_factory_ != 0)
    delete this->proxy_factory_;
}

int
CosEventChannelAdmin::TAO_CosEventChannelAdmin_SupplierAdmin_Proxy_Factory_Adapter::register_proxy_factory (
  TAO_CosEventChannelAdmin_SupplierAdmin_Default_Proxy_Factory *df,
     CORBA::Environment &ACE_TRY_ENV
      )
{
  ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
    this->lock_, 0));
  // Remove any existing <proxy_factory_> and replace with the new one.
  this->unregister_proxy_factory (ACE_TRY_ENV);
  this->proxy_factory_ = df;
  this->delete_proxy_factory_ = 0;
return 0;
}

int
CosEventChannelAdmin::TAO_CosEventChannelAdmin_SupplierAdmin_Proxy_Factory_Adapter::unregister_proxy_factory (
  CORBA::Environment &
    )
{
  ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
    this->lock_, 0));
  if (this->delete_proxy_factory_ == 0 && this->proxy_factory_ != 0)
    {
      // Its necessary to set <delete_proxy_factory_> to 1 to make sure that it
      // doesnt get into an infinite loop in <unregister_proxy_factory> as it is 
      // invoked in the destructor of the class too.
      this->delete_proxy_factory_ = 1;
      delete this->proxy_factory_;
      this->proxy_factory_ = 0;
    }
return 0;
}

CosEventChannelAdmin::SupplierAdmin_ptr
CosEventChannelAdmin::TAO_CosEventChannelAdmin_SupplierAdmin_Proxy_Factory_Adapter::create_proxy (
    ::CosEventChannelAdmin::SupplierAdmin_ptr proxy,
    CORBA::Environment &
  )
{
  ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
    this->lock_, 0));
  // Verify that an <proxy_factory_> is available else make one.
  if (this->proxy_factory_ == 0)
    ACE_NEW_RETURN (this->proxy_factory_,
        TAO_CosEventChannelAdmin_SupplierAdmin_Default_Proxy_Factory (1), 
         0);
      
    
  return this->proxy_factory_->create_proxy (proxy);
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_SupplierAdmin_Smart_Proxy_Base::TAO_CosEventChannelAdmin_SupplierAdmin_Smart_Proxy_Base (::CosEventChannelAdmin::SupplierAdmin_ptr proxy)
: base_proxy_ (proxy)
{
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_SupplierAdmin_Smart_Proxy_Base::~TAO_CosEventChannelAdmin_SupplierAdmin_Smart_Proxy_Base (void)
{
}

CosEventChannelAdmin::ProxyPushConsumer_ptr CosEventChannelAdmin::TAO_CosEventChannelAdmin_SupplierAdmin_Smart_Proxy_Base::obtain_push_consumer  (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
{
  return this->base_proxy_->obtain_push_consumer (
      ACE_TRY_ENV
    );

}

CosEventChannelAdmin::ProxyPullConsumer_ptr CosEventChannelAdmin::TAO_CosEventChannelAdmin_SupplierAdmin_Smart_Proxy_Base::obtain_pull_consumer  (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
{
  return this->base_proxy_->obtain_pull_consumer (
      ACE_TRY_ENV
    );

}

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
  defined (ACE_HAS_GNU_REPO)
template class ACE_Singleton<CosEventChannelAdmin::TAO_CosEventChannelAdmin_SupplierAdmin_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#pragma instantiate ACE_Singleton<CosEventChannelAdmin::TAO_CosEventChannelAdmin_SupplierAdmin_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

static const CORBA::Long _oc_CosEventChannelAdmin_SupplierAdmin[] =
{
  TAO_ENCAP_BYTE_ORDER, // byte order
  51, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x436f7345), ACE_NTOHL (0x76656e74), ACE_NTOHL (0x4368616e), ACE_NTOHL (0x6e656c41), ACE_NTOHL (0x646d696e), ACE_NTOHL (0x2f537570), ACE_NTOHL (0x706c6965), ACE_NTOHL (0x7241646d), ACE_NTOHL (0x696e3a31), ACE_NTOHL (0x2e300000),  // repository ID = IDL:omg.org/CosEventChannelAdmin/SupplierAdmin:1.0
  14, ACE_NTOHL (0x53757070), ACE_NTOHL (0x6c696572), ACE_NTOHL (0x41646d69), ACE_NTOHL (0x6e000000),  // name = SupplierAdmin
};
static CORBA::TypeCode _tc_TAO_tc_CosEventChannelAdmin_SupplierAdmin (CORBA::tk_objref, sizeof (_oc_CosEventChannelAdmin_SupplierAdmin), (char *) &_oc_CosEventChannelAdmin_SupplierAdmin, 0, sizeof (CosEventChannelAdmin::SupplierAdmin));
TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
TAO_NAMESPACE_BEGIN (CosEventChannelAdmin)
TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_SupplierAdmin, &_tc_TAO_tc_CosEventChannelAdmin_SupplierAdmin)
TAO_NAMESPACE_END
CosEventChannelAdmin::EventChannel_ptr CosEventChannelAdmin::EventChannel::_narrow (
    CORBA::Object_ptr obj,
    CORBA::Environment &ACE_TRY_ENV
  )
{
  if (CORBA::is_nil (obj))
    return EventChannel::_nil ();
  CORBA::Boolean is_a = obj->_is_a ("IDL:omg.org/CosEventChannelAdmin/EventChannel:1.0", ACE_TRY_ENV);
  ACE_CHECK_RETURN (EventChannel::_nil ());
  if (is_a == 0)
    return EventChannel::_nil ();
  return EventChannel::_unchecked_narrow (obj, ACE_TRY_ENV);
}

CosEventChannelAdmin::EventChannel_ptr CosEventChannelAdmin::EventChannel::_unchecked_narrow (
    CORBA::Object_ptr obj,
    CORBA::Environment &
  )
{
  if (CORBA::is_nil (obj))
    return EventChannel::_nil ();
  TAO_Stub* stub = obj->_stubobj ();
  stub->_incr_refcnt ();
  EventChannel_ptr default_proxy = EventChannel::_nil ();
  if (obj->_is_collocated () && _TAO_collocation_CosEventChannelAdmin_EventChannel_Stub_Factory_function_pointer != 0)
    {
      default_proxy = _TAO_collocation_CosEventChannelAdmin_EventChannel_Stub_Factory_function_pointer (obj);
    }
  if (CORBA::is_nil (default_proxy))
    ACE_NEW_RETURN (default_proxy, EventChannel (stub), EventChannel::_nil ());
  return TAO_CosEventChannelAdmin_EventChannel_PROXY_FACTORY_ADAPTER::instance ()->create_proxy (default_proxy);
}

CosEventChannelAdmin::EventChannel_ptr 
CosEventChannelAdmin::EventChannel::_duplicate (EventChannel_ptr obj)
{
  if (!CORBA::is_nil (obj))
    obj->_incr_refcnt ();
  return obj;
}

CosEventChannelAdmin::ConsumerAdmin_ptr CosEventChannelAdmin::EventChannel::for_consumers (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
{
  
  CosEventChannelAdmin::ConsumerAdmin_ptr _tao_retval = CosEventChannelAdmin::ConsumerAdmin::_nil ();
  CosEventChannelAdmin::ConsumerAdmin_var _tao_safe_retval (_tao_retval);
  
  
  TAO_Stub *istub = this->_stubobj ();
  if (istub == 0)
    ACE_THROW_RETURN (CORBA::INTERNAL (), 0);

  
  TAO_GIOP_Twoway_Invocation _tao_call (
      istub,
      "for_consumers",
      13,
      istub->orb_core ()
    );

#if defined (TAO_HAS_INTERCEPTORS)
    TAO_ClientRequestInterceptor_Adapter
      _tao_vfr (istub->orb_core ()->orb ()->_get_client_interceptor (ACE_TRY_ENV));
    ACE_CHECK_RETURN (0);
    PortableInterceptor::Cookies _tao_cookies;
    CORBA::NVList_var _tao_interceptor_args;
    if (_tao_vfr.valid ())
      {
        istub->orb_core ()->orb ()->create_list (0, _tao_interceptor_args.inout (), ACE_TRY_ENV);
        ACE_CHECK_RETURN (0);
      }

    ACE_TRY
      {
#endif /* TAO_HAS_INTERCEPTORS */

      for (;;)
      {
        _tao_call.start (ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK_RETURN (0);

        TAO_INTERCEPTOR (
            _tao_vfr.preinvoke (
                _tao_call.request_id (),
                1,
                this,
                "for_consumers",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK_RETURN (0);
        CORBA::Short flag = 131;
        // Tremporary hack until GIOP 1.2 is implemented.
        
        _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK_RETURN (0);

        int _invoke_status =
          _tao_call.invoke (0, 0, ACE_TRY_ENV);
                TAO_INTERCEPTOR_CHECK_RETURN (0);

        if (_invoke_status == TAO_INVOKE_RESTART)
          continue;
        if (_invoke_status != TAO_INVOKE_OK)
        {
          TAO_INTERCEPTOR_THROW_RETURN (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES), 0);

        }
        TAO_InputCDR &_tao_in = _tao_call.inp_stream ();
        if (!(
              (_tao_in >> _tao_safe_retval.inout ())
          ))
          TAO_INTERCEPTOR_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES), 0);

        TAO_INTERCEPTOR (
            _tao_vfr.postinvoke (
                _tao_call.request_id (),
                1,
                this,
                "for_consumers",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK_RETURN (0);
        break;
        
      }
#if defined (TAO_HAS_INTERCEPTORS)
      
    }
  ACE_CATCHANY
    {
      _tao_vfr.exception_occurred (
          _tao_call.request_id (),
          1,
          this,
          "for_consumers",
          _tao_cookies,
          ACE_TRY_ENV
        );
      ACE_RETHROW;
    }
  ACE_ENDTRY;
  ACE_CHECK_RETURN (0);
#endif /* TAO_HAS_INTERCEPTORS */
  return _tao_safe_retval._retn ();
}

CosEventChannelAdmin::SupplierAdmin_ptr CosEventChannelAdmin::EventChannel::for_suppliers (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
{
  
  CosEventChannelAdmin::SupplierAdmin_ptr _tao_retval = CosEventChannelAdmin::SupplierAdmin::_nil ();
  CosEventChannelAdmin::SupplierAdmin_var _tao_safe_retval (_tao_retval);
  
  
  TAO_Stub *istub = this->_stubobj ();
  if (istub == 0)
    ACE_THROW_RETURN (CORBA::INTERNAL (), 0);

  
  TAO_GIOP_Twoway_Invocation _tao_call (
      istub,
      "for_suppliers",
      13,
      istub->orb_core ()
    );

#if defined (TAO_HAS_INTERCEPTORS)
    TAO_ClientRequestInterceptor_Adapter
      _tao_vfr (istub->orb_core ()->orb ()->_get_client_interceptor (ACE_TRY_ENV));
    ACE_CHECK_RETURN (0);
    PortableInterceptor::Cookies _tao_cookies;
    CORBA::NVList_var _tao_interceptor_args;
    if (_tao_vfr.valid ())
      {
        istub->orb_core ()->orb ()->create_list (0, _tao_interceptor_args.inout (), ACE_TRY_ENV);
        ACE_CHECK_RETURN (0);
      }

    ACE_TRY
      {
#endif /* TAO_HAS_INTERCEPTORS */

      for (;;)
      {
        _tao_call.start (ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK_RETURN (0);

        TAO_INTERCEPTOR (
            _tao_vfr.preinvoke (
                _tao_call.request_id (),
                1,
                this,
                "for_suppliers",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK_RETURN (0);
        CORBA::Short flag = 131;
        // Tremporary hack until GIOP 1.2 is implemented.
        
        _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK_RETURN (0);

        int _invoke_status =
          _tao_call.invoke (0, 0, ACE_TRY_ENV);
                TAO_INTERCEPTOR_CHECK_RETURN (0);

        if (_invoke_status == TAO_INVOKE_RESTART)
          continue;
        if (_invoke_status != TAO_INVOKE_OK)
        {
          TAO_INTERCEPTOR_THROW_RETURN (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES), 0);

        }
        TAO_InputCDR &_tao_in = _tao_call.inp_stream ();
        if (!(
              (_tao_in >> _tao_safe_retval.inout ())
          ))
          TAO_INTERCEPTOR_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES), 0);

        TAO_INTERCEPTOR (
            _tao_vfr.postinvoke (
                _tao_call.request_id (),
                1,
                this,
                "for_suppliers",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK_RETURN (0);
        break;
        
      }
#if defined (TAO_HAS_INTERCEPTORS)
      
    }
  ACE_CATCHANY
    {
      _tao_vfr.exception_occurred (
          _tao_call.request_id (),
          1,
          this,
          "for_suppliers",
          _tao_cookies,
          ACE_TRY_ENV
        );
      ACE_RETHROW;
    }
  ACE_ENDTRY;
  ACE_CHECK_RETURN (0);
#endif /* TAO_HAS_INTERCEPTORS */
  return _tao_safe_retval._retn ();
}

void CosEventChannelAdmin::EventChannel::destroy (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
{
  

  
  
  TAO_Stub *istub = this->_stubobj ();
  if (istub == 0)
    ACE_THROW (CORBA::INTERNAL ());

  
  TAO_GIOP_Twoway_Invocation _tao_call (
      istub,
      "destroy",
      7,
      istub->orb_core ()
    );

#if defined (TAO_HAS_INTERCEPTORS)
    TAO_ClientRequestInterceptor_Adapter
      _tao_vfr (istub->orb_core ()->orb ()->_get_client_interceptor (ACE_TRY_ENV));
    ACE_CHECK;
    PortableInterceptor::Cookies _tao_cookies;
    CORBA::NVList_var _tao_interceptor_args;
    if (_tao_vfr.valid ())
      {
        istub->orb_core ()->orb ()->create_list (0, _tao_interceptor_args.inout (), ACE_TRY_ENV);
        ACE_CHECK;
      }

    ACE_TRY
      {
#endif /* TAO_HAS_INTERCEPTORS */

      for (;;)
      {
        _tao_call.start (ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK;

        TAO_INTERCEPTOR (
            _tao_vfr.preinvoke (
                _tao_call.request_id (),
                1,
                this,
                "destroy",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK;
        CORBA::Short flag = 131;
        // Tremporary hack until GIOP 1.2 is implemented.
        
        _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK;

        int _invoke_status =
          _tao_call.invoke (0, 0, ACE_TRY_ENV);
                TAO_INTERCEPTOR_CHECK;

        if (_invoke_status == TAO_INVOKE_RESTART)
          continue;
        if (_invoke_status != TAO_INVOKE_OK)
        {
          TAO_INTERCEPTOR_THROW (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES));
        }
        
        TAO_INTERCEPTOR (
            _tao_vfr.postinvoke (
                _tao_call.request_id (),
                1,
                this,
                "destroy",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK;
        break;
        
      }
#if defined (TAO_HAS_INTERCEPTORS)
      
    }
  ACE_CATCHANY
    {
      _tao_vfr.exception_occurred (
          _tao_call.request_id (),
          1,
          this,
          "destroy",
          _tao_cookies,
          ACE_TRY_ENV
        );
      ACE_RETHROW;
    }
  ACE_ENDTRY;
  ACE_CHECK;
#endif /* TAO_HAS_INTERCEPTORS */

}

CORBA::Boolean CosEventChannelAdmin::EventChannel::_is_a (const CORBA::Char *value, CORBA::Environment &ACE_TRY_ENV)
{
  if (
    (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CosEventChannelAdmin/EventChannel:1.0")) ||
    (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CORBA/Object:1.0")))
  return 1; // success using local knowledge
  else
    return this->CORBA_Object::_is_a (value, ACE_TRY_ENV);
}

const char* CosEventChannelAdmin::EventChannel::_interface_repository_id (void) const
{
  return "IDL:omg.org/CosEventChannelAdmin/EventChannel:1.0";
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_EventChannel_Default_Proxy_Factory::TAO_CosEventChannelAdmin_EventChannel_Default_Proxy_Factory (int register_proxy_factory)
{
  if (register_proxy_factory)
    {
      TAO_CosEventChannelAdmin_EventChannel_PROXY_FACTORY_ADAPTER::instance ()->register_proxy_factory (this);
    }
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_EventChannel_Default_Proxy_Factory::~TAO_CosEventChannelAdmin_EventChannel_Default_Proxy_Factory (void)
{
}

CosEventChannelAdmin::EventChannel_ptr
CosEventChannelAdmin::TAO_CosEventChannelAdmin_EventChannel_Default_Proxy_Factory::create_proxy (
    ::CosEventChannelAdmin::EventChannel_ptr proxy,
    CORBA::Environment &
  )
{
  return proxy;
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_EventChannel_Proxy_Factory_Adapter::TAO_CosEventChannelAdmin_EventChannel_Proxy_Factory_Adapter (void)
   : proxy_factory_ (0),
     delete_proxy_factory_ (0)
{
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_EventChannel_Proxy_Factory_Adapter::~TAO_CosEventChannelAdmin_EventChannel_Proxy_Factory_Adapter (void)
{
  // Making sure the factory which the adapter has is destroyed with it.
  if (this->proxy_factory_ != 0)
    delete this->proxy_factory_;
}

int
CosEventChannelAdmin::TAO_CosEventChannelAdmin_EventChannel_Proxy_Factory_Adapter::register_proxy_factory (
  TAO_CosEventChannelAdmin_EventChannel_Default_Proxy_Factory *df,
     CORBA::Environment &ACE_TRY_ENV
      )
{
  ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
    this->lock_, 0));
  // Remove any existing <proxy_factory_> and replace with the new one.
  this->unregister_proxy_factory (ACE_TRY_ENV);
  this->proxy_factory_ = df;
  this->delete_proxy_factory_ = 0;
return 0;
}

int
CosEventChannelAdmin::TAO_CosEventChannelAdmin_EventChannel_Proxy_Factory_Adapter::unregister_proxy_factory (
  CORBA::Environment &
    )
{
  ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
    this->lock_, 0));
  if (this->delete_proxy_factory_ == 0 && this->proxy_factory_ != 0)
    {
      // Its necessary to set <delete_proxy_factory_> to 1 to make sure that it
      // doesnt get into an infinite loop in <unregister_proxy_factory> as it is 
      // invoked in the destructor of the class too.
      this->delete_proxy_factory_ = 1;
      delete this->proxy_factory_;
      this->proxy_factory_ = 0;
    }
return 0;
}

CosEventChannelAdmin::EventChannel_ptr
CosEventChannelAdmin::TAO_CosEventChannelAdmin_EventChannel_Proxy_Factory_Adapter::create_proxy (
    ::CosEventChannelAdmin::EventChannel_ptr proxy,
    CORBA::Environment &
  )
{
  ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
    this->lock_, 0));
  // Verify that an <proxy_factory_> is available else make one.
  if (this->proxy_factory_ == 0)
    ACE_NEW_RETURN (this->proxy_factory_,
        TAO_CosEventChannelAdmin_EventChannel_Default_Proxy_Factory (1), 
         0);
      
    
  return this->proxy_factory_->create_proxy (proxy);
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_EventChannel_Smart_Proxy_Base::TAO_CosEventChannelAdmin_EventChannel_Smart_Proxy_Base (::CosEventChannelAdmin::EventChannel_ptr proxy)
: base_proxy_ (proxy)
{
}

CosEventChannelAdmin::TAO_CosEventChannelAdmin_EventChannel_Smart_Proxy_Base::~TAO_CosEventChannelAdmin_EventChannel_Smart_Proxy_Base (void)
{
}

CosEventChannelAdmin::ConsumerAdmin_ptr CosEventChannelAdmin::TAO_CosEventChannelAdmin_EventChannel_Smart_Proxy_Base::for_consumers  (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
{
  return this->base_proxy_->for_consumers (
      ACE_TRY_ENV
    );

}

CosEventChannelAdmin::SupplierAdmin_ptr CosEventChannelAdmin::TAO_CosEventChannelAdmin_EventChannel_Smart_Proxy_Base::for_suppliers  (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
{
  return this->base_proxy_->for_suppliers (
      ACE_TRY_ENV
    );

}

void CosEventChannelAdmin::TAO_CosEventChannelAdmin_EventChannel_Smart_Proxy_Base::destroy  (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
{
  this->base_proxy_->destroy (
      ACE_TRY_ENV
    );

}

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
  defined (ACE_HAS_GNU_REPO)
template class ACE_Singleton<CosEventChannelAdmin::TAO_CosEventChannelAdmin_EventChannel_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#pragma instantiate ACE_Singleton<CosEventChannelAdmin::TAO_CosEventChannelAdmin_EventChannel_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

static const CORBA::Long _oc_CosEventChannelAdmin_EventChannel[] =
{
  TAO_ENCAP_BYTE_ORDER, // byte order
  50, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x436f7345), ACE_NTOHL (0x76656e74), ACE_NTOHL (0x4368616e), ACE_NTOHL (0x6e656c41), ACE_NTOHL (0x646d696e), ACE_NTOHL (0x2f457665), ACE_NTOHL (0x6e744368), ACE_NTOHL (0x616e6e65), ACE_NTOHL (0x6c3a312e), ACE_NTOHL (0x30000000),  // repository ID = IDL:omg.org/CosEventChannelAdmin/EventChannel:1.0
  13, ACE_NTOHL (0x4576656e), ACE_NTOHL (0x74436861), ACE_NTOHL (0x6e6e656c), ACE_NTOHL (0x0),  // name = EventChannel
};
static CORBA::TypeCode _tc_TAO_tc_CosEventChannelAdmin_EventChannel (CORBA::tk_objref, sizeof (_oc_CosEventChannelAdmin_EventChannel), (char *) &_oc_CosEventChannelAdmin_EventChannel, 0, sizeof (CosEventChannelAdmin::EventChannel));
TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
TAO_NAMESPACE_BEGIN (CosEventChannelAdmin)
TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_EventChannel, &_tc_TAO_tc_CosEventChannelAdmin_EventChannel)
TAO_NAMESPACE_END
void operator<<= (CORBA::Any &_tao_any, const CosEventChannelAdmin::AlreadyConnected &_tao_elem) // copying
{
  CosEventChannelAdmin::AlreadyConnected *_tao_any_val = 0;
  ACE_NEW (_tao_any_val, CosEventChannelAdmin::AlreadyConnected (_tao_elem));
  if (!_tao_any_val) return;
  ACE_TRY_NEW_ENV
  {
    TAO_OutputCDR stream;
    stream << *_tao_any_val;
    _tao_any._tao_replace (
        CosEventChannelAdmin::_tc_AlreadyConnected,
        TAO_ENCAP_BYTE_ORDER,
        stream.begin (),
        1,
        _tao_any_val,
        ACE_TRY_ENV
      );
    ACE_TRY_CHECK;
  }
  ACE_CATCHANY 
  {
    delete _tao_any_val;
  }
  ACE_ENDTRY;
}

void operator<<= (CORBA::Any &_tao_any, CosEventChannelAdmin::AlreadyConnected *_tao_elem) // non copying
{
  ACE_TRY_NEW_ENV
  {
    TAO_OutputCDR stream;
    stream << *_tao_elem;
    _tao_any._tao_replace (
        CosEventChannelAdmin::_tc_AlreadyConnected,
        TAO_ENCAP_BYTE_ORDER,
        stream.begin (),
        1,
        _tao_elem,
        ACE_TRY_ENV
      );
    ACE_TRY_CHECK;
  }
  ACE_CATCHANY
  {
    delete _tao_elem;
    _tao_elem = 0;
  }
  ACE_ENDTRY;
}

CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CosEventChannelAdmin::AlreadyConnected *&_tao_elem)
{
  ACE_TRY_NEW_ENV
  {
    CORBA::TypeCode_var type = _tao_any.type ();
    if (!type->equivalent (CosEventChannelAdmin::_tc_AlreadyConnected, ACE_TRY_ENV)) // not equal
      {
        _tao_elem = 0;
        return 0;
      }
    ACE_TRY_CHECK;
    if (_tao_any.any_owns_data ())
    {
      _tao_elem = (CosEventChannelAdmin::AlreadyConnected *)_tao_any.value ();
      return 1;
    }
    else
    {
      ACE_NEW_RETURN (_tao_elem, CosEventChannelAdmin::AlreadyConnected, 0);
      TAO_InputCDR stream (
          _tao_any._tao_get_cdr (),
          _tao_any._tao_byte_order ()
        );
      if (stream >> *_tao_elem)
      {
        ((CORBA::Any *)&_tao_any)->_tao_replace (
            CosEventChannelAdmin::_tc_AlreadyConnected,
            1,
            ACE_reinterpret_cast (void *, _tao_elem),
            ACE_TRY_ENV
          );
        ACE_TRY_CHECK;
        return 1;
      }
      else
      {
        delete _tao_elem;
        _tao_elem = 0;
      }
    }
  }
  ACE_CATCHANY
  {
    delete _tao_elem;
    _tao_elem = 0;
    return 0; 
  }
  ACE_ENDTRY;
  return 0;
}

CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CosEventChannelAdmin::AlreadyConnected *&_tao_elem)
{
  ACE_TRY_NEW_ENV
  {
    CORBA::TypeCode_var type = _tao_any.type ();
    if (!type->equivalent (CosEventChannelAdmin::_tc_AlreadyConnected, ACE_TRY_ENV)) // not equal
      {
        _tao_elem = 0;
        return 0;
      }
    ACE_TRY_CHECK;
    if (_tao_any.any_owns_data ())
    {
      _tao_elem = (CosEventChannelAdmin::AlreadyConnected *)_tao_any.value ();
      return 1;
    }
    else
    {
      ACE_NEW_RETURN (_tao_elem, CosEventChannelAdmin::AlreadyConnected, 0);
      TAO_InputCDR stream (
          _tao_any._tao_get_cdr (),
          _tao_any._tao_byte_order ()
        );
      if (stream >> *(CosEventChannelAdmin::AlreadyConnected *)_tao_elem)
      {
        ((CORBA::Any *)&_tao_any)->_tao_replace (
            CosEventChannelAdmin::_tc_AlreadyConnected,
            1,
            ACE_reinterpret_cast (void *, ACE_const_cast (CosEventChannelAdmin::AlreadyConnected *&, _tao_elem)),
            ACE_TRY_ENV
          );
        ACE_TRY_CHECK;
        return 1;
      }
      else
      {
        delete ACE_const_cast (CosEventChannelAdmin::AlreadyConnected *&, _tao_elem);
        _tao_elem = 0;
      }
    }
  }
  ACE_CATCHANY
  {
    delete ACE_const_cast (CosEventChannelAdmin::AlreadyConnected *&, _tao_elem);
    _tao_elem = 0;
    return 0; 
  }
  ACE_ENDTRY;
  return 0;
}

void operator<<= (CORBA::Any &_tao_any, const CosEventChannelAdmin::TypeError &_tao_elem) // copying
{
  CosEventChannelAdmin::TypeError *_tao_any_val = 0;
  ACE_NEW (_tao_any_val, CosEventChannelAdmin::TypeError (_tao_elem));
  if (!_tao_any_val) return;
  ACE_TRY_NEW_ENV
  {
    TAO_OutputCDR stream;
    stream << *_tao_any_val;
    _tao_any._tao_replace (
        CosEventChannelAdmin::_tc_TypeError,
        TAO_ENCAP_BYTE_ORDER,
        stream.begin (),
        1,
        _tao_any_val,
        ACE_TRY_ENV
      );
    ACE_TRY_CHECK;
  }
  ACE_CATCHANY 
  {
    delete _tao_any_val;
  }
  ACE_ENDTRY;
}

void operator<<= (CORBA::Any &_tao_any, CosEventChannelAdmin::TypeError *_tao_elem) // non copying
{
  ACE_TRY_NEW_ENV
  {
    TAO_OutputCDR stream;
    stream << *_tao_elem;
    _tao_any._tao_replace (
        CosEventChannelAdmin::_tc_TypeError,
        TAO_ENCAP_BYTE_ORDER,
        stream.begin (),
        1,
        _tao_elem,
        ACE_TRY_ENV
      );
    ACE_TRY_CHECK;
  }
  ACE_CATCHANY
  {
    delete _tao_elem;
    _tao_elem = 0;
  }
  ACE_ENDTRY;
}

CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CosEventChannelAdmin::TypeError *&_tao_elem)
{
  ACE_TRY_NEW_ENV
  {
    CORBA::TypeCode_var type = _tao_any.type ();
    if (!type->equivalent (CosEventChannelAdmin::_tc_TypeError, ACE_TRY_ENV)) // not equal
      {
        _tao_elem = 0;
        return 0;
      }
    ACE_TRY_CHECK;
    if (_tao_any.any_owns_data ())
    {
      _tao_elem = (CosEventChannelAdmin::TypeError *)_tao_any.value ();
      return 1;
    }
    else
    {
      ACE_NEW_RETURN (_tao_elem, CosEventChannelAdmin::TypeError, 0);
      TAO_InputCDR stream (
          _tao_any._tao_get_cdr (),
          _tao_any._tao_byte_order ()
        );
      if (stream >> *_tao_elem)
      {
        ((CORBA::Any *)&_tao_any)->_tao_replace (
            CosEventChannelAdmin::_tc_TypeError,
            1,
            ACE_reinterpret_cast (void *, _tao_elem),
            ACE_TRY_ENV
          );
        ACE_TRY_CHECK;
        return 1;
      }
      else
      {
        delete _tao_elem;
        _tao_elem = 0;
      }
    }
  }
  ACE_CATCHANY
  {
    delete _tao_elem;
    _tao_elem = 0;
    return 0; 
  }
  ACE_ENDTRY;
  return 0;
}

CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CosEventChannelAdmin::TypeError *&_tao_elem)
{
  ACE_TRY_NEW_ENV
  {
    CORBA::TypeCode_var type = _tao_any.type ();
    if (!type->equivalent (CosEventChannelAdmin::_tc_TypeError, ACE_TRY_ENV)) // not equal
      {
        _tao_elem = 0;
        return 0;
      }
    ACE_TRY_CHECK;
    if (_tao_any.any_owns_data ())
    {
      _tao_elem = (CosEventChannelAdmin::TypeError *)_tao_any.value ();
      return 1;
    }
    else
    {
      ACE_NEW_RETURN (_tao_elem, CosEventChannelAdmin::TypeError, 0);
      TAO_InputCDR stream (
          _tao_any._tao_get_cdr (),
          _tao_any._tao_byte_order ()
        );
      if (stream >> *(CosEventChannelAdmin::TypeError *)_tao_elem)
      {
        ((CORBA::Any *)&_tao_any)->_tao_replace (
            CosEventChannelAdmin::_tc_TypeError,
            1,
            ACE_reinterpret_cast (void *, ACE_const_cast (CosEventChannelAdmin::TypeError *&, _tao_elem)),
            ACE_TRY_ENV
          );
        ACE_TRY_CHECK;
        return 1;
      }
      else
      {
        delete ACE_const_cast (CosEventChannelAdmin::TypeError *&, _tao_elem);
        _tao_elem = 0;
      }
    }
  }
  ACE_CATCHANY
  {
    delete ACE_const_cast (CosEventChannelAdmin::TypeError *&, _tao_elem);
    _tao_elem = 0;
    return 0; 
  }
  ACE_ENDTRY;
  return 0;
}

CosEventChannelAdmin::ProxyPushConsumer_ptr (*_TAO_collocation_CosEventChannelAdmin_ProxyPushConsumer_Stub_Factory_function_pointer) (
    CORBA::Object_ptr obj
  ) = 0;
void operator<<= (CORBA::Any &_tao_any, CosEventChannelAdmin::ProxyPushConsumer_ptr _tao_elem)
{
  CORBA::Object_ptr *_tao_obj_ptr = 0;
  ACE_TRY_NEW_ENV
  {
    ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
    *_tao_obj_ptr = CosEventChannelAdmin::ProxyPushConsumer::_duplicate (_tao_elem);
    TAO_OutputCDR stream;
    if (stream << *_tao_obj_ptr)
    {
      _tao_any._tao_replace (
          CosEventChannelAdmin::_tc_ProxyPushConsumer, 
          TAO_ENCAP_BYTE_ORDER,
          stream.begin (),
          1,
          _tao_obj_ptr,
          ACE_TRY_ENV
        );
      ACE_TRY_CHECK;
    }
    else
    {
      delete _tao_obj_ptr;
    }
  }
  ACE_CATCHANY
  {
    delete _tao_obj_ptr;
  }
  ACE_ENDTRY;
}

CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CosEventChannelAdmin::ProxyPushConsumer_ptr &_tao_elem)
{
  CORBA::Object_ptr *tmp = 0;
  ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
  ACE_TRY_NEW_ENV
  {
    _tao_elem = CosEventChannelAdmin::ProxyPushConsumer::_nil ();
    CORBA::TypeCode_var type = _tao_any.type ();
    if (!type->equivalent (CosEventChannelAdmin::_tc_ProxyPushConsumer, ACE_TRY_ENV)) // not equal
      {
        delete tmp;
        return 0;
      }
    ACE_TRY_CHECK;
    TAO_InputCDR stream (
        _tao_any._tao_get_cdr (),
        _tao_any._tao_byte_order ()
      );
    CORBA::Object_var _tao_obj_var;
    if (stream >> _tao_obj_var.out ())
    {
      _tao_elem = CosEventChannelAdmin::ProxyPushConsumer::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
      ACE_TRY_CHECK;
      *tmp = (CORBA::Object_ptr) _tao_elem;  // any owns the object
      ((CORBA::Any *)&_tao_any)->_tao_replace (
          CosEventChannelAdmin::_tc_ProxyPushConsumer,
          1,
          tmp,
          ACE_TRY_ENV
        );
      ACE_TRY_CHECK;
      return 1;
    }
    else    // failure
    {
      delete tmp;
    }
  }
  ACE_CATCHANY
  {
    delete tmp;
    _tao_elem = CosEventChannelAdmin::ProxyPushConsumer::_nil ();
    return 0;
  }
  ACE_ENDTRY;
  _tao_elem = CosEventChannelAdmin::ProxyPushConsumer::_nil ();
  return 0;
}

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)  || \
    defined (ACE_HAS_GNU_REPO)
    template class TAO_Object_Field_T<CosEventChannelAdmin::ProxyPushConsumer,CosEventChannelAdmin::ProxyPushConsumer_var>;
  template class TAO_Object_Manager<CosEventChannelAdmin::ProxyPushConsumer,CosEventChannelAdmin::ProxyPushConsumer_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#  pragma instantiate TAO_Object_Field_T<CosEventChannelAdmin::ProxyPushConsumer,CosEventChannelAdmin::ProxyPushConsumer_var>
#  pragma instantiate TAO_Object_Manager<CosEventChannelAdmin::ProxyPushConsumer,CosEventChannelAdmin::ProxyPushConsumer_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

CosEventChannelAdmin::ProxyPullSupplier_ptr (*_TAO_collocation_CosEventChannelAdmin_ProxyPullSupplier_Stub_Factory_function_pointer) (
    CORBA::Object_ptr obj
  ) = 0;
void operator<<= (CORBA::Any &_tao_any, CosEventChannelAdmin::ProxyPullSupplier_ptr _tao_elem)
{
  CORBA::Object_ptr *_tao_obj_ptr = 0;
  ACE_TRY_NEW_ENV
  {
    ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
    *_tao_obj_ptr = CosEventChannelAdmin::ProxyPullSupplier::_duplicate (_tao_elem);
    TAO_OutputCDR stream;
    if (stream << *_tao_obj_ptr)
    {
      _tao_any._tao_replace (
          CosEventChannelAdmin::_tc_ProxyPullSupplier, 
          TAO_ENCAP_BYTE_ORDER,
          stream.begin (),
          1,
          _tao_obj_ptr,
          ACE_TRY_ENV
        );
      ACE_TRY_CHECK;
    }
    else
    {
      delete _tao_obj_ptr;
    }
  }
  ACE_CATCHANY
  {
    delete _tao_obj_ptr;
  }
  ACE_ENDTRY;
}

CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CosEventChannelAdmin::ProxyPullSupplier_ptr &_tao_elem)
{
  CORBA::Object_ptr *tmp = 0;
  ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
  ACE_TRY_NEW_ENV
  {
    _tao_elem = CosEventChannelAdmin::ProxyPullSupplier::_nil ();
    CORBA::TypeCode_var type = _tao_any.type ();
    if (!type->equivalent (CosEventChannelAdmin::_tc_ProxyPullSupplier, ACE_TRY_ENV)) // not equal
      {
        delete tmp;
        return 0;
      }
    ACE_TRY_CHECK;
    TAO_InputCDR stream (
        _tao_any._tao_get_cdr (),
        _tao_any._tao_byte_order ()
      );
    CORBA::Object_var _tao_obj_var;
    if (stream >> _tao_obj_var.out ())
    {
      _tao_elem = CosEventChannelAdmin::ProxyPullSupplier::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
      ACE_TRY_CHECK;
      *tmp = (CORBA::Object_ptr) _tao_elem;  // any owns the object
      ((CORBA::Any *)&_tao_any)->_tao_replace (
          CosEventChannelAdmin::_tc_ProxyPullSupplier,
          1,
          tmp,
          ACE_TRY_ENV
        );
      ACE_TRY_CHECK;
      return 1;
    }
    else    // failure
    {
      delete tmp;
    }
  }
  ACE_CATCHANY
  {
    delete tmp;
    _tao_elem = CosEventChannelAdmin::ProxyPullSupplier::_nil ();
    return 0;
  }
  ACE_ENDTRY;
  _tao_elem = CosEventChannelAdmin::ProxyPullSupplier::_nil ();
  return 0;
}

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)  || \
    defined (ACE_HAS_GNU_REPO)
    template class TAO_Object_Field_T<CosEventChannelAdmin::ProxyPullSupplier,CosEventChannelAdmin::ProxyPullSupplier_var>;
  template class TAO_Object_Manager<CosEventChannelAdmin::ProxyPullSupplier,CosEventChannelAdmin::ProxyPullSupplier_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#  pragma instantiate TAO_Object_Field_T<CosEventChannelAdmin::ProxyPullSupplier,CosEventChannelAdmin::ProxyPullSupplier_var>
#  pragma instantiate TAO_Object_Manager<CosEventChannelAdmin::ProxyPullSupplier,CosEventChannelAdmin::ProxyPullSupplier_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

CosEventChannelAdmin::ProxyPullConsumer_ptr (*_TAO_collocation_CosEventChannelAdmin_ProxyPullConsumer_Stub_Factory_function_pointer) (
    CORBA::Object_ptr obj
  ) = 0;
void operator<<= (CORBA::Any &_tao_any, CosEventChannelAdmin::ProxyPullConsumer_ptr _tao_elem)
{
  CORBA::Object_ptr *_tao_obj_ptr = 0;
  ACE_TRY_NEW_ENV
  {
    ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
    *_tao_obj_ptr = CosEventChannelAdmin::ProxyPullConsumer::_duplicate (_tao_elem);
    TAO_OutputCDR stream;
    if (stream << *_tao_obj_ptr)
    {
      _tao_any._tao_replace (
          CosEventChannelAdmin::_tc_ProxyPullConsumer, 
          TAO_ENCAP_BYTE_ORDER,
          stream.begin (),
          1,
          _tao_obj_ptr,
          ACE_TRY_ENV
        );
      ACE_TRY_CHECK;
    }
    else
    {
      delete _tao_obj_ptr;
    }
  }
  ACE_CATCHANY
  {
    delete _tao_obj_ptr;
  }
  ACE_ENDTRY;
}

CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CosEventChannelAdmin::ProxyPullConsumer_ptr &_tao_elem)
{
  CORBA::Object_ptr *tmp = 0;
  ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
  ACE_TRY_NEW_ENV
  {
    _tao_elem = CosEventChannelAdmin::ProxyPullConsumer::_nil ();
    CORBA::TypeCode_var type = _tao_any.type ();
    if (!type->equivalent (CosEventChannelAdmin::_tc_ProxyPullConsumer, ACE_TRY_ENV)) // not equal
      {
        delete tmp;
        return 0;
      }
    ACE_TRY_CHECK;
    TAO_InputCDR stream (
        _tao_any._tao_get_cdr (),
        _tao_any._tao_byte_order ()
      );
    CORBA::Object_var _tao_obj_var;
    if (stream >> _tao_obj_var.out ())
    {
      _tao_elem = CosEventChannelAdmin::ProxyPullConsumer::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
      ACE_TRY_CHECK;
      *tmp = (CORBA::Object_ptr) _tao_elem;  // any owns the object
      ((CORBA::Any *)&_tao_any)->_tao_replace (
          CosEventChannelAdmin::_tc_ProxyPullConsumer,
          1,
          tmp,
          ACE_TRY_ENV
        );
      ACE_TRY_CHECK;
      return 1;
    }
    else    // failure
    {
      delete tmp;
    }
  }
  ACE_CATCHANY
  {
    delete tmp;
    _tao_elem = CosEventChannelAdmin::ProxyPullConsumer::_nil ();
    return 0;
  }
  ACE_ENDTRY;
  _tao_elem = CosEventChannelAdmin::ProxyPullConsumer::_nil ();
  return 0;
}

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)  || \
    defined (ACE_HAS_GNU_REPO)
    template class TAO_Object_Field_T<CosEventChannelAdmin::ProxyPullConsumer,CosEventChannelAdmin::ProxyPullConsumer_var>;
  template class TAO_Object_Manager<CosEventChannelAdmin::ProxyPullConsumer,CosEventChannelAdmin::ProxyPullConsumer_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#  pragma instantiate TAO_Object_Field_T<CosEventChannelAdmin::ProxyPullConsumer,CosEventChannelAdmin::ProxyPullConsumer_var>
#  pragma instantiate TAO_Object_Manager<CosEventChannelAdmin::ProxyPullConsumer,CosEventChannelAdmin::ProxyPullConsumer_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

CosEventChannelAdmin::ProxyPushSupplier_ptr (*_TAO_collocation_CosEventChannelAdmin_ProxyPushSupplier_Stub_Factory_function_pointer) (
    CORBA::Object_ptr obj
  ) = 0;
void operator<<= (CORBA::Any &_tao_any, CosEventChannelAdmin::ProxyPushSupplier_ptr _tao_elem)
{
  CORBA::Object_ptr *_tao_obj_ptr = 0;
  ACE_TRY_NEW_ENV
  {
    ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
    *_tao_obj_ptr = CosEventChannelAdmin::ProxyPushSupplier::_duplicate (_tao_elem);
    TAO_OutputCDR stream;
    if (stream << *_tao_obj_ptr)
    {
      _tao_any._tao_replace (
          CosEventChannelAdmin::_tc_ProxyPushSupplier, 
          TAO_ENCAP_BYTE_ORDER,
          stream.begin (),
          1,
          _tao_obj_ptr,
          ACE_TRY_ENV
        );
      ACE_TRY_CHECK;
    }
    else
    {
      delete _tao_obj_ptr;
    }
  }
  ACE_CATCHANY
  {
    delete _tao_obj_ptr;
  }
  ACE_ENDTRY;
}

CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CosEventChannelAdmin::ProxyPushSupplier_ptr &_tao_elem)
{
  CORBA::Object_ptr *tmp = 0;
  ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
  ACE_TRY_NEW_ENV
  {
    _tao_elem = CosEventChannelAdmin::ProxyPushSupplier::_nil ();
    CORBA::TypeCode_var type = _tao_any.type ();
    if (!type->equivalent (CosEventChannelAdmin::_tc_ProxyPushSupplier, ACE_TRY_ENV)) // not equal
      {
        delete tmp;
        return 0;
      }
    ACE_TRY_CHECK;
    TAO_InputCDR stream (
        _tao_any._tao_get_cdr (),
        _tao_any._tao_byte_order ()
      );
    CORBA::Object_var _tao_obj_var;
    if (stream >> _tao_obj_var.out ())
    {
      _tao_elem = CosEventChannelAdmin::ProxyPushSupplier::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
      ACE_TRY_CHECK;
      *tmp = (CORBA::Object_ptr) _tao_elem;  // any owns the object
      ((CORBA::Any *)&_tao_any)->_tao_replace (
          CosEventChannelAdmin::_tc_ProxyPushSupplier,
          1,
          tmp,
          ACE_TRY_ENV
        );
      ACE_TRY_CHECK;
      return 1;
    }
    else    // failure
    {
      delete tmp;
    }
  }
  ACE_CATCHANY
  {
    delete tmp;
    _tao_elem = CosEventChannelAdmin::ProxyPushSupplier::_nil ();
    return 0;
  }
  ACE_ENDTRY;
  _tao_elem = CosEventChannelAdmin::ProxyPushSupplier::_nil ();
  return 0;
}

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)  || \
    defined (ACE_HAS_GNU_REPO)
    template class TAO_Object_Field_T<CosEventChannelAdmin::ProxyPushSupplier,CosEventChannelAdmin::ProxyPushSupplier_var>;
  template class TAO_Object_Manager<CosEventChannelAdmin::ProxyPushSupplier,CosEventChannelAdmin::ProxyPushSupplier_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#  pragma instantiate TAO_Object_Field_T<CosEventChannelAdmin::ProxyPushSupplier,CosEventChannelAdmin::ProxyPushSupplier_var>
#  pragma instantiate TAO_Object_Manager<CosEventChannelAdmin::ProxyPushSupplier,CosEventChannelAdmin::ProxyPushSupplier_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

CosEventChannelAdmin::ConsumerAdmin_ptr (*_TAO_collocation_CosEventChannelAdmin_ConsumerAdmin_Stub_Factory_function_pointer) (
    CORBA::Object_ptr obj
  ) = 0;
void operator<<= (CORBA::Any &_tao_any, CosEventChannelAdmin::ConsumerAdmin_ptr _tao_elem)
{
  CORBA::Object_ptr *_tao_obj_ptr = 0;
  ACE_TRY_NEW_ENV
  {
    ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
    *_tao_obj_ptr = CosEventChannelAdmin::ConsumerAdmin::_duplicate (_tao_elem);
    TAO_OutputCDR stream;
    if (stream << *_tao_obj_ptr)
    {
      _tao_any._tao_replace (
          CosEventChannelAdmin::_tc_ConsumerAdmin, 
          TAO_ENCAP_BYTE_ORDER,
          stream.begin (),
          1,
          _tao_obj_ptr,
          ACE_TRY_ENV
        );
      ACE_TRY_CHECK;
    }
    else
    {
      delete _tao_obj_ptr;
    }
  }
  ACE_CATCHANY
  {
    delete _tao_obj_ptr;
  }
  ACE_ENDTRY;
}

CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CosEventChannelAdmin::ConsumerAdmin_ptr &_tao_elem)
{
  CORBA::Object_ptr *tmp = 0;
  ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
  ACE_TRY_NEW_ENV
  {
    _tao_elem = CosEventChannelAdmin::ConsumerAdmin::_nil ();
    CORBA::TypeCode_var type = _tao_any.type ();
    if (!type->equivalent (CosEventChannelAdmin::_tc_ConsumerAdmin, ACE_TRY_ENV)) // not equal
      {
        delete tmp;
        return 0;
      }
    ACE_TRY_CHECK;
    TAO_InputCDR stream (
        _tao_any._tao_get_cdr (),
        _tao_any._tao_byte_order ()
      );
    CORBA::Object_var _tao_obj_var;
    if (stream >> _tao_obj_var.out ())
    {
      _tao_elem = CosEventChannelAdmin::ConsumerAdmin::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
      ACE_TRY_CHECK;
      *tmp = (CORBA::Object_ptr) _tao_elem;  // any owns the object
      ((CORBA::Any *)&_tao_any)->_tao_replace (
          CosEventChannelAdmin::_tc_ConsumerAdmin,
          1,
          tmp,
          ACE_TRY_ENV
        );
      ACE_TRY_CHECK;
      return 1;
    }
    else    // failure
    {
      delete tmp;
    }
  }
  ACE_CATCHANY
  {
    delete tmp;
    _tao_elem = CosEventChannelAdmin::ConsumerAdmin::_nil ();
    return 0;
  }
  ACE_ENDTRY;
  _tao_elem = CosEventChannelAdmin::ConsumerAdmin::_nil ();
  return 0;
}

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)  || \
    defined (ACE_HAS_GNU_REPO)
    template class TAO_Object_Field_T<CosEventChannelAdmin::ConsumerAdmin,CosEventChannelAdmin::ConsumerAdmin_var>;
  template class TAO_Object_Manager<CosEventChannelAdmin::ConsumerAdmin,CosEventChannelAdmin::ConsumerAdmin_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#  pragma instantiate TAO_Object_Field_T<CosEventChannelAdmin::ConsumerAdmin,CosEventChannelAdmin::ConsumerAdmin_var>
#  pragma instantiate TAO_Object_Manager<CosEventChannelAdmin::ConsumerAdmin,CosEventChannelAdmin::ConsumerAdmin_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

CosEventChannelAdmin::SupplierAdmin_ptr (*_TAO_collocation_CosEventChannelAdmin_SupplierAdmin_Stub_Factory_function_pointer) (
    CORBA::Object_ptr obj
  ) = 0;
void operator<<= (CORBA::Any &_tao_any, CosEventChannelAdmin::SupplierAdmin_ptr _tao_elem)
{
  CORBA::Object_ptr *_tao_obj_ptr = 0;
  ACE_TRY_NEW_ENV
  {
    ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
    *_tao_obj_ptr = CosEventChannelAdmin::SupplierAdmin::_duplicate (_tao_elem);
    TAO_OutputCDR stream;
    if (stream << *_tao_obj_ptr)
    {
      _tao_any._tao_replace (
          CosEventChannelAdmin::_tc_SupplierAdmin, 
          TAO_ENCAP_BYTE_ORDER,
          stream.begin (),
          1,
          _tao_obj_ptr,
          ACE_TRY_ENV
        );
      ACE_TRY_CHECK;
    }
    else
    {
      delete _tao_obj_ptr;
    }
  }
  ACE_CATCHANY
  {
    delete _tao_obj_ptr;
  }
  ACE_ENDTRY;
}

CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CosEventChannelAdmin::SupplierAdmin_ptr &_tao_elem)
{
  CORBA::Object_ptr *tmp = 0;
  ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
  ACE_TRY_NEW_ENV
  {
    _tao_elem = CosEventChannelAdmin::SupplierAdmin::_nil ();
    CORBA::TypeCode_var type = _tao_any.type ();
    if (!type->equivalent (CosEventChannelAdmin::_tc_SupplierAdmin, ACE_TRY_ENV)) // not equal
      {
        delete tmp;
        return 0;
      }
    ACE_TRY_CHECK;
    TAO_InputCDR stream (
        _tao_any._tao_get_cdr (),
        _tao_any._tao_byte_order ()
      );
    CORBA::Object_var _tao_obj_var;
    if (stream >> _tao_obj_var.out ())
    {
      _tao_elem = CosEventChannelAdmin::SupplierAdmin::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
      ACE_TRY_CHECK;
      *tmp = (CORBA::Object_ptr) _tao_elem;  // any owns the object
      ((CORBA::Any *)&_tao_any)->_tao_replace (
          CosEventChannelAdmin::_tc_SupplierAdmin,
          1,
          tmp,
          ACE_TRY_ENV
        );
      ACE_TRY_CHECK;
      return 1;
    }
    else    // failure
    {
      delete tmp;
    }
  }
  ACE_CATCHANY
  {
    delete tmp;
    _tao_elem = CosEventChannelAdmin::SupplierAdmin::_nil ();
    return 0;
  }
  ACE_ENDTRY;
  _tao_elem = CosEventChannelAdmin::SupplierAdmin::_nil ();
  return 0;
}

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)  || \
    defined (ACE_HAS_GNU_REPO)
    template class TAO_Object_Field_T<CosEventChannelAdmin::SupplierAdmin,CosEventChannelAdmin::SupplierAdmin_var>;
  template class TAO_Object_Manager<CosEventChannelAdmin::SupplierAdmin,CosEventChannelAdmin::SupplierAdmin_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#  pragma instantiate TAO_Object_Field_T<CosEventChannelAdmin::SupplierAdmin,CosEventChannelAdmin::SupplierAdmin_var>
#  pragma instantiate TAO_Object_Manager<CosEventChannelAdmin::SupplierAdmin,CosEventChannelAdmin::SupplierAdmin_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

CosEventChannelAdmin::EventChannel_ptr (*_TAO_collocation_CosEventChannelAdmin_EventChannel_Stub_Factory_function_pointer) (
    CORBA::Object_ptr obj
  ) = 0;
void operator<<= (CORBA::Any &_tao_any, CosEventChannelAdmin::EventChannel_ptr _tao_elem)
{
  CORBA::Object_ptr *_tao_obj_ptr = 0;
  ACE_TRY_NEW_ENV
  {
    ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
    *_tao_obj_ptr = CosEventChannelAdmin::EventChannel::_duplicate (_tao_elem);
    TAO_OutputCDR stream;
    if (stream << *_tao_obj_ptr)
    {
      _tao_any._tao_replace (
          CosEventChannelAdmin::_tc_EventChannel, 
          TAO_ENCAP_BYTE_ORDER,
          stream.begin (),
          1,
          _tao_obj_ptr,
          ACE_TRY_ENV
        );
      ACE_TRY_CHECK;
    }
    else
    {
      delete _tao_obj_ptr;
    }
  }
  ACE_CATCHANY
  {
    delete _tao_obj_ptr;
  }
  ACE_ENDTRY;
}

CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CosEventChannelAdmin::EventChannel_ptr &_tao_elem)
{
  CORBA::Object_ptr *tmp = 0;
  ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
  ACE_TRY_NEW_ENV
  {
    _tao_elem = CosEventChannelAdmin::EventChannel::_nil ();
    CORBA::TypeCode_var type = _tao_any.type ();
    if (!type->equivalent (CosEventChannelAdmin::_tc_EventChannel, ACE_TRY_ENV)) // not equal
      {
        delete tmp;
        return 0;
      }
    ACE_TRY_CHECK;
    TAO_InputCDR stream (
        _tao_any._tao_get_cdr (),
        _tao_any._tao_byte_order ()
      );
    CORBA::Object_var _tao_obj_var;
    if (stream >> _tao_obj_var.out ())
    {
      _tao_elem = CosEventChannelAdmin::EventChannel::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
      ACE_TRY_CHECK;
      *tmp = (CORBA::Object_ptr) _tao_elem;  // any owns the object
      ((CORBA::Any *)&_tao_any)->_tao_replace (
          CosEventChannelAdmin::_tc_EventChannel,
          1,
          tmp,
          ACE_TRY_ENV
        );
      ACE_TRY_CHECK;
      return 1;
    }
    else    // failure
    {
      delete tmp;
    }
  }
  ACE_CATCHANY
  {
    delete tmp;
    _tao_elem = CosEventChannelAdmin::EventChannel::_nil ();
    return 0;
  }
  ACE_ENDTRY;
  _tao_elem = CosEventChannelAdmin::EventChannel::_nil ();
  return 0;
}

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)  || \
    defined (ACE_HAS_GNU_REPO)
    template class TAO_Object_Field_T<CosEventChannelAdmin::EventChannel,CosEventChannelAdmin::EventChannel_var>;
  template class TAO_Object_Manager<CosEventChannelAdmin::EventChannel,CosEventChannelAdmin::EventChannel_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#  pragma instantiate TAO_Object_Field_T<CosEventChannelAdmin::EventChannel,CosEventChannelAdmin::EventChannel_var>
#  pragma instantiate TAO_Object_Manager<CosEventChannelAdmin::EventChannel,CosEventChannelAdmin::EventChannel_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

