Public Member Functions | Private Types | Private Member Functions | Friends

TAO_Notify_StructuredProxyPushSupplier Class Reference

Implements the CosNotifyChannelAdmin::StructuredProxyPushSupplier methods. More...

#include <StructuredProxyPushSupplier.h>

Inheritance diagram for TAO_Notify_StructuredProxyPushSupplier:
Inheritance graph
[legend]
Collaboration diagram for TAO_Notify_StructuredProxyPushSupplier:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TAO_Notify_StructuredProxyPushSupplier (void)
 Constructor.
virtual ~TAO_Notify_StructuredProxyPushSupplier ()
 Destructor.
virtual void load_attrs (const TAO_Notify::NVPList &attrs)
virtual void validate ()
virtual
CosNotifyChannelAdmin::ProxyType 
MyType (void)
 = Servant methods
virtual void connect_structured_push_consumer (CosNotifyComm::StructuredPushConsumer_ptr push_consumer)
virtual void disconnect_structured_push_supplier ()
virtual const char * get_proxy_type_name (void) const
virtual void configure (TAO_Notify_ConsumerAdmin &admin, CosNotifyChannelAdmin::ProxyID_out proxy_id)

Private Types

typedef
TAO_Notify_ProxySupplier_T
< POA_Event_Forwarder::StructuredProxyPushSupplier > 
SuperClass

Private Member Functions

virtual void release (void)
 Release.

Friends

class TAO_Notify_Builder

Detailed Description

Implements the CosNotifyChannelAdmin::StructuredProxyPushSupplier methods.

Definition at line 47 of file StructuredProxyPushSupplier.h.


Member Typedef Documentation

typedef TAO_Notify_ProxySupplier_T<POA_Event_Forwarder::StructuredProxyPushSupplier> TAO_Notify_StructuredProxyPushSupplier::SuperClass [private]

Definition at line 50 of file StructuredProxyPushSupplier.h.


Constructor & Destructor Documentation

TAO_Notify_StructuredProxyPushSupplier::TAO_Notify_StructuredProxyPushSupplier ( void   ) 

Constructor.

Definition at line 16 of file StructuredProxyPushSupplier.cpp.

{
}

TAO_Notify_StructuredProxyPushSupplier::~TAO_Notify_StructuredProxyPushSupplier (  )  [virtual]

Destructor.

Definition at line 20 of file StructuredProxyPushSupplier.cpp.

{
}


Member Function Documentation

void TAO_Notify_StructuredProxyPushSupplier::configure ( TAO_Notify_ConsumerAdmin admin,
CosNotifyChannelAdmin::ProxyID_out  proxy_id 
) [virtual]

Definition at line 110 of file StructuredProxyPushSupplier.cpp.

{
  // Nothing to do.
  // This virtual method was added to support Notification MC
}

void TAO_Notify_StructuredProxyPushSupplier::connect_structured_push_consumer ( CosNotifyComm::StructuredPushConsumer_ptr  push_consumer  )  [virtual]

Definition at line 38 of file StructuredProxyPushSupplier.cpp.

{
  // Convert Consumer to Base Type
  TAO_Notify_StructuredPushConsumer* consumer;
  ACE_NEW_THROW_EX (consumer,
                    TAO_Notify_StructuredPushConsumer (this),
                    CORBA::NO_MEMORY ());

  consumer->init (push_consumer);

  this->connect (consumer);
  this->self_change ();
}

void TAO_Notify_StructuredProxyPushSupplier::disconnect_structured_push_supplier ( void   )  [virtual]

Definition at line 53 of file StructuredProxyPushSupplier.cpp.

const char * TAO_Notify_StructuredProxyPushSupplier::get_proxy_type_name ( void   )  const [virtual]

Implements TAO_Notify_Proxy.

Definition at line 62 of file StructuredProxyPushSupplier.cpp.

{
  return "structured_proxy_push_supplier";
}

void TAO_Notify_StructuredProxyPushSupplier::load_attrs ( const TAO_Notify::NVPList attrs  )  [virtual]

Definition at line 85 of file StructuredProxyPushSupplier.cpp.

{
  SuperClass::load_attrs(attrs);
  ACE_CString ior;
  if (attrs.load("PeerIOR", ior))
  {
    CORBA::ORB_var orb = TAO_Notify_PROPERTIES::instance()->orb();
    try
    {
      CosNotifyComm::StructuredPushConsumer_var pc = CosNotifyComm::StructuredPushConsumer::_nil();
      if (ior.length() > 0)
      {
        CORBA::Object_var obj = orb->string_to_object(ior.c_str());
        pc = CosNotifyComm::StructuredPushConsumer::_unchecked_narrow(obj.in());
      }
      this->connect_structured_push_consumer(pc.in());
    }
    catch (const CORBA::Exception&)
    {
      // if we can't connect... tough
    }
  }
}

CosNotifyChannelAdmin::ProxyType TAO_Notify_StructuredProxyPushSupplier::MyType ( void   )  [virtual]

= Servant methods

Definition at line 32 of file StructuredProxyPushSupplier.cpp.

{
  return CosNotifyChannelAdmin::PUSH_STRUCTURED;
}

void TAO_Notify_StructuredProxyPushSupplier::release ( void   )  [private, virtual]

Release.

Definition at line 25 of file StructuredProxyPushSupplier.cpp.

{
  delete this;
  //@@ inform factory
}

void TAO_Notify_StructuredProxyPushSupplier::validate (  )  [virtual]

Implements TAO_Notify_Proxy.

Definition at line 68 of file StructuredProxyPushSupplier.cpp.

{
  TAO_Notify_Consumer* con = this->consumer ();
  if (con != 0 && ! con->is_alive (true))
  {
    if (TAO_debug_level > 0)
    {
      ACE_DEBUG ((LM_DEBUG, 
                  ACE_TEXT ("(%P|%t) TAO_Notify_StructuredProxyPushSupplier::validate(%d)")
                  ACE_TEXT ("disconnecting \n"), this->id ()));
    }

    this->disconnect_structured_push_supplier ();
  }
}


Friends And Related Function Documentation

friend class TAO_Notify_Builder [friend]

Definition at line 51 of file StructuredProxyPushSupplier.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines