Public Member Functions | Protected Member Functions

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.

  : TAO_AV_Endpoint_Process_Strategy (process_options)
{
}

TAO_AV_Endpoint_Process_Strategy_B::~TAO_AV_Endpoint_Process_Strategy_B ( void   )  [virtual]

Destructor.

Definition at line 326 of file Endpoint_Strategy.cpp.

{
}


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.

{
  try
    {
    if (this->activate () == -1)
      ACE_ERROR_RETURN ((LM_ERROR,
                         "(%P|%t) TAO_AV_Endpoint_Process_Strategy: Error in activate ()\n"),
                        -1);

    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",
                TAO_ORB_Core_instance ()->orb ()->object_to_string (this->stream_endpoint_b_.in())));
    stream_endpoint = AVStreams::StreamEndPoint_B::_duplicate ( this->stream_endpoint_b_.in() );
    vdev = AVStreams::VDev::_duplicate( this->vdev_.in() );
  }
  catch (const CORBA::Exception& ex)
    {
      ex._tao_print_exception (
        "TAO_AV_Endpoint_Process_Strategy_B::create_B\n");
      return -1;
    }
  return 0;
}

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.

{
  try
    {
      char stream_endpoint_name[BUFSIZ];
      ACE_OS::sprintf (stream_endpoint_name,
                       "%s:%s:%ld",
                       "Stream_Endpoint_B",
                       this->host_,
                       (long) this->pid_);

      if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"(%P|%t)%s\n",stream_endpoint_name));

      // Create the name
      CosNaming::Name Stream_Endpoint_B_Name (1);

      Stream_Endpoint_B_Name.length (1);
      Stream_Endpoint_B_Name [0].id = CORBA::string_dup (stream_endpoint_name);

      // Get the CORBA::Object reference
      CORBA::Object_var stream_endpoint_b =
        this->naming_context_->resolve (Stream_Endpoint_B_Name);

      // Narrow the reference
      this->stream_endpoint_b_ =
        AVStreams::StreamEndPoint_B::_narrow (stream_endpoint_b.in ());

      // Check for validity
      if (CORBA::is_nil (this->stream_endpoint_b_.in() ))
        ACE_ERROR_RETURN ((LM_ERROR,
                           " could not resolve Stream_Endpoint_B in Naming service <%s>\n"),
                          -1);
    }
  catch (const CORBA::Exception& ex)
    {
      ex._tao_print_exception (
        "TAO_AV_Endpoint_Process_Strategy_B::get_stream_endpoint");
      return -1;
    }
  return 0;
}


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines