Reactive strategy base class. More...
#include <Endpoint_Strategy_T.h>
Protected Member Functions | |
TAO_AV_Endpoint_Reactive_Strategy (void) | |
Constructor. | |
virtual | ~TAO_AV_Endpoint_Reactive_Strategy (void) |
Destructor. | |
virtual int | activate (void) |
creates and activates the streamendpoint, vdev, and mediacontrol | |
virtual int | activate_stream_endpoint (void)=0 |
activates the stream_endpoint with the POA | |
virtual int | activate_vdev (void) |
activates the vdev with the POA | |
virtual int | activate_mediactrl (void) |
activates the media controller with the POA | |
virtual int | make_vdev (T_VDev *&vdev) |
virtual int | make_stream_endpoint (T_StreamEndpoint *&stream_endpoint) |
virtual int | make_mediactrl (T_MediaCtrl *&media_ctrl) |
char * | activate_with_poa (PortableServer::Servant servant) |
Protected Attributes | |
CORBA::ORB_var | orb_ |
PortableServer::POA_var | poa_ |
CORBA::Object_var | media_ctrl_obj_ |
T_StreamEndpoint * | stream_endpoint_a_servant_ |
T_StreamEndpoint * | stream_endpoint_b_servant_ |
T_VDev * | vdev_servant_ |
T_MediaCtrl * | media_ctrl_servant_ |
Reactive strategy base class.
Definition at line 27 of file Endpoint_Strategy_T.h.
TAO_AV_Endpoint_Reactive_Strategy< T_StreamEndpoint, T_VDev, T_MediaCtrl >::TAO_AV_Endpoint_Reactive_Strategy | ( | void | ) | [protected] |
Constructor.
Definition at line 21 of file Endpoint_Strategy_T.cpp.
: stream_endpoint_a_servant_(0), stream_endpoint_b_servant_(0), vdev_servant_(0), media_ctrl_servant_(0) { }
TAO_AV_Endpoint_Reactive_Strategy< T_StreamEndpoint, T_VDev, T_MediaCtrl >::~TAO_AV_Endpoint_Reactive_Strategy | ( | void | ) | [protected, virtual] |
Destructor.
Definition at line 28 of file Endpoint_Strategy_T.cpp.
{ // Do not allow exceptions to escape from the destructor try { if(this->stream_endpoint_a_servant_ ) { stream_endpoint_a_servant_->_remove_ref (); } if(this->stream_endpoint_b_servant_) { stream_endpoint_b_servant_->_remove_ref (); } if(this->vdev_servant_) { vdev_servant_->_remove_ref (); } if(this->media_ctrl_servant_) { media_ctrl_servant_->_remove_ref (); } } catch (const CORBA::Exception&) { } }
int TAO_AV_Endpoint_Reactive_Strategy< T_StreamEndpoint, T_VDev, T_MediaCtrl >::activate | ( | void | ) | [protected, virtual] |
creates and activates the streamendpoint, vdev, and mediacontrol
Definition at line 62 of file Endpoint_Strategy_T.cpp.
{ try { this->activate_stream_endpoint (); if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"(%P|%t)TAO_AV_Endpoint_Reactive_Strategy::activated stream_endpoint\n")); this->activate_vdev (); if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"(%P|%t)TAO_AV_Endpoint_Reactive_Strategy::activated vdev\n")); this->activate_mediactrl (); if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"(%P|%t)TAO_AV_Endpoint_Reactive_Strategy::activated mediactrl\n")); } catch (const CORBA::Exception& ex) { ex._tao_print_exception ( "TAO_Endpoint_Reactive_Strategy::activate"); return -1; } return 0; }
int TAO_AV_Endpoint_Reactive_Strategy< T_StreamEndpoint, T_VDev, T_MediaCtrl >::activate_mediactrl | ( | void | ) | [protected, virtual] |
activates the media controller with the POA
Definition at line 136 of file Endpoint_Strategy_T.cpp.
{ try { // Bridge pattern. Subclasses can override this if (this->make_mediactrl ( media_ctrl_servant_ ) == -1) return -1; // Associate the media controller object reference with the vdev, as per the OMG spec CORBA::Any anyval; media_ctrl_obj_ = media_ctrl_servant_->_this (); anyval <<= media_ctrl_obj_.in(); this->vdev_->define_property ("Related_MediaCtrl", anyval); } catch (const CORBA::Exception& ex) { ex._tao_print_exception ( "TAO_AV_Endpoint_Reactive_Strategy::activate_mediactrl"); return -1; } return 0; }
virtual int TAO_AV_Endpoint_Reactive_Strategy< T_StreamEndpoint, T_VDev, T_MediaCtrl >::activate_stream_endpoint | ( | void | ) | [protected, pure virtual] |
activates the stream_endpoint with the POA
Implemented in TAO_AV_Endpoint_Reactive_Strategy_A< T_StreamEndpoint, T_VDev, T_MediaCtrl >, and TAO_AV_Endpoint_Reactive_Strategy_B< T_StreamEndpoint, T_Vdev, T_MediaCtrl >.
int TAO_AV_Endpoint_Reactive_Strategy< T_StreamEndpoint, T_VDev, T_MediaCtrl >::activate_vdev | ( | void | ) | [protected, virtual] |
activates the vdev with the POA
Definition at line 105 of file Endpoint_Strategy_T.cpp.
{ try { // Bridge pattern. Allow subclasses to override this behavior T_VDev *vdev = 0; if (this->make_vdev (vdev) == -1) return -1; // Activate the object under the root poa. // CORBA::String_var vdev_ior = this->activate_with_poa (vdev, //); // if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"(%P|%t)TAO_AV_Endpoint_Reactive_Strategy::activate_vdev, vdev ior is:%s\n", // vdev_ior. in ())); // Save the object reference, so that create_A can return it this->vdev_ = vdev->_this (); } catch (const CORBA::Exception& ex) { ex._tao_print_exception ( "TAO_AV_Endpoint_Reactive_Strategy::activate_vdev"); return -1; } return 0; }
char * TAO_AV_Endpoint_Reactive_Strategy< T_StreamEndpoint, T_VDev, T_MediaCtrl >::activate_with_poa | ( | PortableServer::Servant | servant | ) | [protected] |
Definition at line 86 of file Endpoint_Strategy_T.cpp.
{ PortableServer::ObjectId_var id = this->poa_->activate_object (servant); CORBA::Object_var obj = this->poa_->id_to_reference (id.in ()); CORBA::String_var str = this->orb_->object_to_string (obj.in ()); return str._retn (); }
int TAO_AV_Endpoint_Reactive_Strategy< T_StreamEndpoint, T_VDev, T_MediaCtrl >::make_mediactrl | ( | T_MediaCtrl *& | media_ctrl | ) | [protected, virtual] |
Bridge method to create a media_ctrl, a la Acceptor. Applications can override this
Definition at line 190 of file Endpoint_Strategy_T.cpp.
{ ACE_NEW_RETURN (media_ctrl, T_MediaCtrl, -1); return 0; }
int TAO_AV_Endpoint_Reactive_Strategy< T_StreamEndpoint, T_VDev, T_MediaCtrl >::make_stream_endpoint | ( | T_StreamEndpoint *& | stream_endpoint | ) | [protected, virtual] |
Bridge method to create a stream_endpoint, a la Acceptor. Applications can override this
Definition at line 168 of file Endpoint_Strategy_T.cpp.
{ ACE_NEW_RETURN (stream_endpoint, T_StreamEndpoint, -1); return 0; }
int TAO_AV_Endpoint_Reactive_Strategy< T_StreamEndpoint, T_VDev, T_MediaCtrl >::make_vdev | ( | T_VDev *& | vdev | ) | [protected, virtual] |
Bridge method to create a vdev, a la Acceptor. Applications can override this
Definition at line 179 of file Endpoint_Strategy_T.cpp.
{ ACE_NEW_RETURN (vdev, T_VDev, -1); return 0; }
CORBA::Object_var TAO_AV_Endpoint_Reactive_Strategy< T_StreamEndpoint, T_VDev, T_MediaCtrl >::media_ctrl_obj_ [protected] |
Definition at line 71 of file Endpoint_Strategy_T.h.
T_MediaCtrl* TAO_AV_Endpoint_Reactive_Strategy< T_StreamEndpoint, T_VDev, T_MediaCtrl >::media_ctrl_servant_ [protected] |
Definition at line 79 of file Endpoint_Strategy_T.h.
CORBA::ORB_var TAO_AV_Endpoint_Reactive_Strategy< T_StreamEndpoint, T_VDev, T_MediaCtrl >::orb_ [protected] |
Definition at line 67 of file Endpoint_Strategy_T.h.
PortableServer::POA_var TAO_AV_Endpoint_Reactive_Strategy< T_StreamEndpoint, T_VDev, T_MediaCtrl >::poa_ [protected] |
Definition at line 69 of file Endpoint_Strategy_T.h.
T_StreamEndpoint* TAO_AV_Endpoint_Reactive_Strategy< T_StreamEndpoint, T_VDev, T_MediaCtrl >::stream_endpoint_a_servant_ [protected] |
Definition at line 73 of file Endpoint_Strategy_T.h.
T_StreamEndpoint* TAO_AV_Endpoint_Reactive_Strategy< T_StreamEndpoint, T_VDev, T_MediaCtrl >::stream_endpoint_b_servant_ [protected] |
Definition at line 75 of file Endpoint_Strategy_T.h.
T_VDev* TAO_AV_Endpoint_Reactive_Strategy< T_StreamEndpoint, T_VDev, T_MediaCtrl >::vdev_servant_ [protected] |
Definition at line 77 of file Endpoint_Strategy_T.h.