#include <Endpoint_Strategy.h>
Inheritance diagram for TAO_AV_Endpoint_Process_Strategy_B:


Public Member Functions | |
| TAO_AV_Endpoint_Process_Strategy_B (ACE_Process_Options *process_options) | |
| Constructor. | |
| virtual | ~TAO_AV_Endpoint_Process_Strategy_B (void) |
| Destructor. | |
Protected Member Functions | |
| virtual int | create_B (AVStreams::StreamEndPoint_B_ptr &stream_endpoint, AVStreams::VDev_ptr &vdev) |
| Creates a "B" type stream endpoint, and a vdev. | |
| virtual int | get_stream_endpoint (void) |
| Gets the object reference of the "B" type streamendpoint. | |
Definition at line 154 of file Endpoint_Strategy.h.
|
|
Constructor.
Definition at line 320 of file Endpoint_Strategy.cpp.
00321 : TAO_AV_Endpoint_Process_Strategy (process_options) 00322 { 00323 } |
|
|
Destructor.
Definition at line 326 of file Endpoint_Strategy.cpp.
00327 {
00328 }
|
|
||||||||||||
|
Creates a "B" type stream endpoint, and a vdev.
Reimplemented from TAO_AV_Endpoint_Strategy. Definition at line 332 of file Endpoint_Strategy.cpp. References ACE_DEBUG, ACE_ERROR_RETURN, TAO_AV_Endpoint_Process_Strategy::activate(), LM_DEBUG, LM_ERROR, TAO_debug_level, and TAO_ORB_Core_instance().
00334 {
00335 try
00336 {
00337 if (this->activate () == -1)
00338 ACE_ERROR_RETURN ((LM_ERROR,
00339 "(%P|%t) TAO_AV_Endpoint_Process_Strategy: Error in activate ()\n"),
00340 -1);
00341
00342 if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"(%P|%t)TAO_AV_Endpoint_Process_Strategy_B::create_B ()\n: stream_endpoint is:%s\n",
00343 TAO_ORB_Core_instance ()->orb ()->object_to_string (this->stream_endpoint_b_.in())));
00344 stream_endpoint = AVStreams::StreamEndPoint_B::_duplicate ( this->stream_endpoint_b_.in() );
00345 vdev = AVStreams::VDev::_duplicate( this->vdev_.in() );
00346 }
00347 catch (const CORBA::Exception& ex)
00348 {
00349 ex._tao_print_exception (
00350 "TAO_AV_Endpoint_Process_Strategy_B::create_B\n");
00351 return -1;
00352 }
00353 return 0;
00354 }
|
|
|
Gets the object reference of the "B" type streamendpoint.
Implements TAO_AV_Endpoint_Process_Strategy. Definition at line 358 of file Endpoint_Strategy.cpp. References ACE_DEBUG, ACE_ERROR_RETURN, CORBA::is_nil(), LM_DEBUG, LM_ERROR, ACE_OS::sprintf(), CORBA::string_dup(), and TAO_debug_level.
00359 {
00360 try
00361 {
00362 char stream_endpoint_name[BUFSIZ];
00363 ACE_OS::sprintf (stream_endpoint_name,
00364 "%s:%s:%ld",
00365 "Stream_Endpoint_B",
00366 this->host_,
00367 (long) this->pid_);
00368
00369 if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"(%P|%t)%s\n",stream_endpoint_name));
00370
00371 // Create the name
00372 CosNaming::Name Stream_Endpoint_B_Name (1);
00373
00374 Stream_Endpoint_B_Name.length (1);
00375 Stream_Endpoint_B_Name [0].id = CORBA::string_dup (stream_endpoint_name);
00376
00377 // Get the CORBA::Object reference
00378 CORBA::Object_var stream_endpoint_b =
00379 this->naming_context_->resolve (Stream_Endpoint_B_Name);
00380
00381 // Narrow the reference
00382 this->stream_endpoint_b_ =
00383 AVStreams::StreamEndPoint_B::_narrow (stream_endpoint_b.in ());
00384
00385 // Check for validity
00386 if (CORBA::is_nil (this->stream_endpoint_b_.in() ))
00387 ACE_ERROR_RETURN ((LM_ERROR,
00388 " could not resolve Stream_Endpoint_B in Naming service <%s>\n"),
00389 -1);
00390 }
00391 catch (const CORBA::Exception& ex)
00392 {
00393 ex._tao_print_exception (
00394 "TAO_AV_Endpoint_Process_Strategy_B::get_stream_endpoint");
00395 return -1;
00396 }
00397 return 0;
00398 }
|
1.3.6