#include <Endpoint_Strategy_T.h>
Inheritance diagram for TAO_AV_Endpoint_Reactive_Strategy< T_StreamEndpoint, T_VDev, T_MediaCtrl >:
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_ |
Definition at line 27 of file Endpoint_Strategy_T.h.
TAO_BEGIN_VERSIONED_NAMESPACE_DECL 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.
00022 : stream_endpoint_a_servant_(0), stream_endpoint_b_servant_(0), vdev_servant_(0), 00023 media_ctrl_servant_(0) 00024 { 00025 }
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.
00029 { 00030 // Do not allow exceptions to escape from the destructor 00031 try 00032 { 00033 if(this->stream_endpoint_a_servant_ ) 00034 { 00035 stream_endpoint_a_servant_->_remove_ref (); 00036 } 00037 00038 if(this->stream_endpoint_b_servant_) 00039 { 00040 stream_endpoint_b_servant_->_remove_ref (); 00041 } 00042 00043 if(this->vdev_servant_) 00044 { 00045 vdev_servant_->_remove_ref (); 00046 } 00047 00048 if(this->media_ctrl_servant_) 00049 { 00050 media_ctrl_servant_->_remove_ref (); 00051 } 00052 } 00053 catch (const CORBA::Exception&) 00054 { 00055 } 00056 00057 }
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.
References CORBA::Exception::_tao_print_exception(), ACE_DEBUG, LM_DEBUG, and TAO_debug_level.
00063 { 00064 try 00065 { 00066 this->activate_stream_endpoint (); 00067 if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"(%P|%t)TAO_AV_Endpoint_Reactive_Strategy::activated stream_endpoint\n")); 00068 00069 this->activate_vdev (); 00070 if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"(%P|%t)TAO_AV_Endpoint_Reactive_Strategy::activated vdev\n")); 00071 00072 this->activate_mediactrl (); 00073 if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"(%P|%t)TAO_AV_Endpoint_Reactive_Strategy::activated mediactrl\n")); 00074 } 00075 catch (const CORBA::Exception& ex) 00076 { 00077 ex._tao_print_exception ( 00078 "TAO_Endpoint_Reactive_Strategy::activate"); 00079 return -1; 00080 } 00081 return 0; 00082 }
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.
References CORBA::Exception::_tao_print_exception().
00137 { 00138 try 00139 { 00140 // Bridge pattern. Subclasses can override this 00141 if (this->make_mediactrl ( media_ctrl_servant_ ) == -1) 00142 return -1; 00143 00144 // Associate the media controller object reference with the vdev, as per the OMG spec 00145 CORBA::Any anyval; 00146 media_ctrl_obj_ 00147 = media_ctrl_servant_->_this (); 00148 00149 anyval <<= media_ctrl_obj_.in(); 00150 00151 00152 this->vdev_->define_property ("Related_MediaCtrl", 00153 anyval); 00154 00155 } 00156 catch (const CORBA::Exception& ex) 00157 { 00158 ex._tao_print_exception ( 00159 "TAO_AV_Endpoint_Reactive_Strategy::activate_mediactrl"); 00160 return -1; 00161 } 00162 return 0; 00163 }
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.
References CORBA::Exception::_tao_print_exception().
00106 { 00107 try 00108 { 00109 // Bridge pattern. Allow subclasses to override this behavior 00110 T_VDev *vdev = 0; 00111 if (this->make_vdev (vdev) == -1) 00112 return -1; 00113 00114 // Activate the object under the root poa. 00115 // CORBA::String_var vdev_ior = this->activate_with_poa (vdev, 00116 //); 00117 // if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"(%P|%t)TAO_AV_Endpoint_Reactive_Strategy::activate_vdev, vdev ior is:%s\n", 00118 // vdev_ior. in ())); 00119 00120 // Save the object reference, so that create_A can return it 00121 this->vdev_ = vdev->_this (); 00122 } 00123 catch (const CORBA::Exception& ex) 00124 { 00125 ex._tao_print_exception ( 00126 "TAO_AV_Endpoint_Reactive_Strategy::activate_vdev"); 00127 return -1; 00128 } 00129 return 0; 00130 }
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.
References TAO_Pseudo_Var_T< T >::in().
00087 { 00088 00089 PortableServer::ObjectId_var id = 00090 this->poa_->activate_object (servant); 00091 00092 CORBA::Object_var obj = 00093 this->poa_->id_to_reference (id.in ()); 00094 00095 CORBA::String_var str = 00096 this->orb_->object_to_string (obj.in ()); 00097 00098 return str._retn (); 00099 }
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.
References ACE_NEW_RETURN.
00191 { 00192 ACE_NEW_RETURN (media_ctrl, 00193 T_MediaCtrl, 00194 -1); 00195 return 0; 00196 }
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.
References ACE_NEW_RETURN.
00169 { 00170 ACE_NEW_RETURN (stream_endpoint, 00171 T_StreamEndpoint, 00172 -1); 00173 return 0; 00174 }
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.
References ACE_NEW_RETURN.
00180 { 00181 ACE_NEW_RETURN (vdev, 00182 T_VDev, 00183 -1); 00184 return 0; 00185 }
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.