TAO_AV_Endpoint_Process_Strategy_A Class Reference

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

#include <Endpoint_Strategy.h>

Inheritance diagram for TAO_AV_Endpoint_Process_Strategy_A:

Inheritance graph
[legend]
Collaboration diagram for TAO_AV_Endpoint_Process_Strategy_A:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_AV_Endpoint_Process_Strategy_A (ACE_Process_Options *process_options)
 Constructor.
virtual ~TAO_AV_Endpoint_Process_Strategy_A (void)
 Destructor.

Protected Member Functions

virtual int create_A (AVStreams::StreamEndPoint_A_ptr &stream_endpoint, AVStreams::VDev_ptr &vdev)
 Creates an "A" type stream endpoint, and a vdev.
virtual int get_stream_endpoint (void)
 Gets the "A" type stream endpoint from the child process.

Detailed Description

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

Definition at line 127 of file Endpoint_Strategy.h.


Constructor & Destructor Documentation

TAO_AV_Endpoint_Process_Strategy_A::TAO_AV_Endpoint_Process_Strategy_A ( ACE_Process_Options process_options  ) 

Constructor.

Definition at line 243 of file Endpoint_Strategy.cpp.

00244   : TAO_AV_Endpoint_Process_Strategy (process_options)
00245 {
00246 }

TAO_AV_Endpoint_Process_Strategy_A::~TAO_AV_Endpoint_Process_Strategy_A ( void   )  [virtual]

Destructor.

Definition at line 249 of file Endpoint_Strategy.cpp.

00250 {
00251 }


Member Function Documentation

int TAO_AV_Endpoint_Process_Strategy_A::create_A ( AVStreams::StreamEndPoint_A_ptr &  stream_endpoint,
AVStreams::VDev_ptr &  vdev 
) [protected, virtual]

Creates an "A" type stream endpoint, and a vdev.

Reimplemented from TAO_AV_Endpoint_Strategy.

Definition at line 255 of file Endpoint_Strategy.cpp.

References ACE_ERROR_RETURN, and LM_ERROR.

00257 {
00258   // use the baseclass activate
00259   if (this->activate () == -1)
00260     ACE_ERROR_RETURN ((LM_ERROR,
00261                        "(%P|%t) TAO_AV_Endpoint_Process_Strategy: Error in activate ()\n"),
00262                       -1);
00263 
00264   // return the object references
00265   stream_endpoint = AVStreams::StreamEndPoint_A::_duplicate( this->stream_endpoint_a_.in() );
00266   vdev = AVStreams::VDev::_duplicate( this->vdev_.in() );
00267   return 0;
00268 
00269 }

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

Gets the "A" type stream endpoint from the child process.

Implements TAO_AV_Endpoint_Process_Strategy.

Definition at line 273 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_a_, CORBA::string_dup(), and TAO_debug_level.

00274 {
00275   try
00276     {
00277       char stream_endpoint_name[BUFSIZ];
00278       ACE_OS::sprintf (stream_endpoint_name,
00279                        "%s:%s:%ld",
00280                        "Stream_Endpoint_A",
00281                        this->host_,
00282                        (long) this->pid_);
00283 
00284       if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"(%P|%t)%s\n",stream_endpoint_name));
00285 
00286       // Create the name
00287       CosNaming::Name Stream_Endpoint_A_Name (1);
00288 
00289       Stream_Endpoint_A_Name.length (1);
00290       Stream_Endpoint_A_Name [0].id = CORBA::string_dup (stream_endpoint_name);
00291 
00292       // Get the CORBA::Object
00293       CORBA::Object_var stream_endpoint_a =
00294         this->naming_context_->resolve (Stream_Endpoint_A_Name);
00295 
00296       // Narrow the reference
00297       this->stream_endpoint_a_ =
00298         AVStreams::StreamEndPoint_A::_narrow (stream_endpoint_a.in ());
00299 
00300       // Check for validity
00301       if (CORBA::is_nil (this->stream_endpoint_a_.in() ))
00302         ACE_ERROR_RETURN ((LM_ERROR,
00303                            " could not resolve Stream_Endpoint_A in Naming service <%s>\n"),
00304                           -1);
00305     }
00306   catch (const CORBA::Exception& ex)
00307     {
00308       ex._tao_print_exception (
00309         "TAO_AV_Endpoint_Process_Strategy_A::get_stream_endpoint");
00310       return -1;
00311     }
00312   return 0;
00313 }


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