Public Member Functions | Protected Member Functions | Protected Attributes

TAO_Transport_Descriptor_Interface Class Reference

An abstract base class for Transport Property. More...

#include <Transport_Descriptor_Interface.h>

Inheritance diagram for TAO_Transport_Descriptor_Interface:
Inheritance graph
[legend]
Collaboration diagram for TAO_Transport_Descriptor_Interface:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual ~TAO_Transport_Descriptor_Interface (void)
 Destructor.
virtual
TAO_Transport_Descriptor_Interface
duplicate (void)=0
virtual CORBA::Boolean is_equivalent (const TAO_Transport_Descriptor_Interface *other_prop)=0
 Try to determine if this object is same as the other_prop.
virtual u_long hash (void) const =0
 Generate hash value for our class.
TAO_Endpointendpoint (void)
 Return the underlying endpoint object.
CORBA::Boolean reset_endpoint (TAO_Endpoint *ep)
void set_bidir_flag (CORBA::Boolean flag)
 Set the BiDir flag.

Protected Member Functions

 TAO_Transport_Descriptor_Interface (void)
 Default Constructor.
 TAO_Transport_Descriptor_Interface (TAO_Endpoint *endpoint, CORBA::Boolean take_ownership=false)
 Constructor.

Protected Attributes

TAO_Endpointendpoint_
 The base property of the connection ie. the peer's endpoint.
CORBA::Boolean bidir_flag_
 Should the endpoint be used in either direction?
CORBA::Boolean release_

Detailed Description

An abstract base class for Transport Property.

This class provides an abstract interface and holds minimal info on which the Transport Caching scheme is based on. Concrete connection properties can be got by inheriting from this class and implementing the virtual functions. Note 1: Additional properties for connection like Qos, Priority that the RT folks would need, can be added by inheriting from this class and providing the following methods. 1. duplicate () 2. is_equivalent () 3. hash ()

Definition at line 47 of file Transport_Descriptor_Interface.h.


Constructor & Destructor Documentation

TAO_Transport_Descriptor_Interface::~TAO_Transport_Descriptor_Interface ( void   )  [virtual]

Destructor.

Definition at line 16 of file Transport_Descriptor_Interface.cpp.

{
  if (this->release_)
    {
      delete this->endpoint_;
    }
}

TAO_Transport_Descriptor_Interface::TAO_Transport_Descriptor_Interface ( void   )  [protected]

Default Constructor.

Definition at line 18 of file Transport_Descriptor_Interface.inl.

  : endpoint_ (0),
    bidir_flag_ (false),
    release_ (false)
{
}

TAO_Transport_Descriptor_Interface::TAO_Transport_Descriptor_Interface ( TAO_Endpoint endpoint,
CORBA::Boolean  take_ownership = false 
) [protected]

Constructor.

Definition at line 8 of file Transport_Descriptor_Interface.inl.

  : endpoint_ (endpoint),
    bidir_flag_ (false),
    release_ (take_ownership)
{
}


Member Function Documentation

virtual TAO_Transport_Descriptor_Interface* TAO_Transport_Descriptor_Interface::duplicate ( void   )  [pure virtual]

This call allocates and copies the contents of this class and returns the pointer

Implemented in TAO_Base_Transport_Property, and TAO_RT_Transport_Descriptor.

TAO_Endpoint * TAO_Transport_Descriptor_Interface::endpoint ( void   ) 

Return the underlying endpoint object.

Definition at line 27 of file Transport_Descriptor_Interface.inl.

{
  return this->endpoint_;
}

virtual u_long TAO_Transport_Descriptor_Interface::hash ( void   )  const [pure virtual]

Generate hash value for our class.

Implemented in TAO_Base_Transport_Property, and TAO_RT_Transport_Descriptor.

virtual CORBA::Boolean TAO_Transport_Descriptor_Interface::is_equivalent ( const TAO_Transport_Descriptor_Interface other_prop  )  [pure virtual]

Try to determine if this object is same as the other_prop.

Implemented in TAO_Base_Transport_Property, and TAO_RT_Transport_Descriptor.

CORBA::Boolean TAO_Transport_Descriptor_Interface::reset_endpoint ( TAO_Endpoint ep  ) 

Reset the endpoint pointer to point to another, if that one is part of the chain based by the current endpoint. Although this method is public it should only be used by the protocol specific connector, right before caching, and only when a parallel connect was attempted with more than one possible endpoints.

Definition at line 25 of file Transport_Descriptor_Interface.cpp.

{
  // calling on a dynamically allocation descriptor is not allowed.
  if (this->release_)
    return false;

  for (TAO_Endpoint *ptr = this->endpoint_; ptr != 0; ptr = ptr->next())

    if (ptr == ep)
      {
        this->endpoint_ = ep;
        return true;
      }
  return false;
}

void TAO_Transport_Descriptor_Interface::set_bidir_flag ( CORBA::Boolean  flag  ) 

Set the BiDir flag.

Definition at line 34 of file Transport_Descriptor_Interface.inl.

{
  this->bidir_flag_ = flag;
}


Member Data Documentation

Should the endpoint be used in either direction?

Definition at line 89 of file Transport_Descriptor_Interface.h.

The base property of the connection ie. the peer's endpoint.

Definition at line 86 of file Transport_Descriptor_Interface.h.

Is the endpoint allocated on the heap? If so, we will have to delete it when we destruct ourselves.

Definition at line 93 of file Transport_Descriptor_Interface.h.


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