TAO_AV_Endpoint_Process_Strategy_B Class Reference

Process-based strategy to create "B" type endpoints. More...

#include <Endpoint_Strategy.h>

Inheritance diagram for TAO_AV_Endpoint_Process_Strategy_B:

Inheritance graph
[legend]
Collaboration diagram for TAO_AV_Endpoint_Process_Strategy_B:

Collaboration graph
[legend]
List of all members.

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.

Detailed Description

Process-based strategy to create "B" type endpoints.

Definition at line 154 of file Endpoint_Strategy.h.


Constructor & Destructor Documentation

TAO_AV_Endpoint_Process_Strategy_B::TAO_AV_Endpoint_Process_Strategy_B ( ACE_Process_Options process_options  ) 

Constructor.

Definition at line 320 of file Endpoint_Strategy.cpp.

00321   : TAO_AV_Endpoint_Process_Strategy (process_options)
00322 {
00323 }

TAO_AV_Endpoint_Process_Strategy_B::~TAO_AV_Endpoint_Process_Strategy_B ( void   )  [virtual]

Destructor.

Definition at line 326 of file Endpoint_Strategy.cpp.

00327 {
00328 }


Member Function Documentation

int TAO_AV_Endpoint_Process_Strategy_B::create_B ( AVStreams::StreamEndPoint_B_ptr &  stream_endpoint,
AVStreams::VDev_ptr &  vdev 
) [protected, virtual]

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 CORBA::Exception::_tao_print_exception(), ACE_DEBUG, ACE_ERROR_RETURN, 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 }

int TAO_AV_Endpoint_Process_Strategy_B::get_stream_endpoint ( void   )  [protected, virtual]

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 CORBA::Exception::_tao_print_exception(), ACE_DEBUG, ACE_ERROR_RETURN, TAO_Pseudo_Var_T< T >::in(), CORBA::is_nil(), LM_DEBUG, LM_ERROR, TAO_AV_Endpoint_Process_Strategy::naming_context_, ACE_OS::sprintf(), TAO_AV_Endpoint_Strategy::stream_endpoint_b_, 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 }


The documentation for this class was generated from the following files:
Generated on Tue Feb 2 17:48:00 2010 for TAO_AV by  doxygen 1.4.7