TAO_SSLIOP_Synthetic_Endpoint Class Reference

#include <SSLIOP_Endpoint.h>

Inheritance diagram for TAO_SSLIOP_Synthetic_Endpoint:

Inheritance graph
[legend]
Collaboration diagram for TAO_SSLIOP_Synthetic_Endpoint:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_SSLIOP_Synthetic_Endpoint (TAO_IIOP_Endpoint *iiop_endp)
 Constructor.
virtual ~TAO_SSLIOP_Synthetic_Endpoint (void)
 Destructor.
CORBA::Boolean is_equivalent (const TAO_Endpoint *other_endpoint)
virtual TAO_Endpointduplicate (void)

Private Member Functions

 TAO_SSLIOP_Synthetic_Endpoint (const ::SSLIOP::SSL *ssl)

Detailed Description

Definition at line 224 of file SSLIOP_Endpoint.h.


Constructor & Destructor Documentation

TAO_SSLIOP_Synthetic_Endpoint::TAO_SSLIOP_Synthetic_Endpoint ( TAO_IIOP_Endpoint iiop_endp  ) 

Constructor.

Definition at line 347 of file SSLIOP_Endpoint.cpp.

References TAO_IIOP_Endpoint::port(), SSLIOP::SSL::port, and TAO_SSLIOP_Endpoint::ssl_component_.

00348   : TAO_SSLIOP_Endpoint ((const ::SSLIOP::SSL *)0, iiop_endp)
00349 {
00350    this->ssl_component_.port = iiop_endp->port ();
00351 }

TAO_SSLIOP_Synthetic_Endpoint::~TAO_SSLIOP_Synthetic_Endpoint ( void   )  [virtual]

Destructor.

Definition at line 337 of file SSLIOP_Endpoint.cpp.

00338 {
00339 }

TAO_SSLIOP_Synthetic_Endpoint::TAO_SSLIOP_Synthetic_Endpoint ( const ::SSLIOP::SSL ssl  )  [private]

Definition at line 341 of file SSLIOP_Endpoint.cpp.

00342   : TAO_SSLIOP_Endpoint (ssl, 0)
00343 {
00344 }


Member Function Documentation

TAO_Endpoint * TAO_SSLIOP_Synthetic_Endpoint::duplicate ( void   )  [virtual]

Return a copy of the corresponding endpoints by allocating memory.

Reimplemented from TAO_SSLIOP_Endpoint.

Definition at line 388 of file SSLIOP_Endpoint.cpp.

References ACE_NEW_RETURN, TAO_SSLIOP_Endpoint::credentials(), TAO_SSLIOP_Endpoint::hash(), TAO_Endpoint::hash_val_, TAO_SSLIOP_Endpoint::iiop_endpoint(), TAO_SSLIOP_Endpoint::set_sec_attrs(), and TAO_SSLIOP_Endpoint::trust().

00389 {
00390   TAO_SSLIOP_Synthetic_Endpoint *endpoint = 0;
00391 
00392   // @@ We need to set the priority of the newly formed endpoint. It
00393   // shouldnt be a problem as long as SSL is not used with RTCORBA.
00394   ACE_NEW_RETURN (endpoint,
00395                   TAO_SSLIOP_Synthetic_Endpoint (&(this->ssl_component ())),
00396                   0);
00397 
00398   if (this->credentials_set())
00399     endpoint->set_sec_attrs (this->qop (),this->trust (), this->credentials ());
00400 
00401   endpoint->iiop_endpoint (this->iiop_endpoint (), true);
00402   endpoint->hash_val_ = this->hash ();
00403   return endpoint;
00404 }

CORBA::Boolean TAO_SSLIOP_Synthetic_Endpoint::is_equivalent ( const TAO_Endpoint other_endpoint  )  [virtual]

Return true if this endpoint is equivalent to

Parameters:
other_endpoint. Two synthetic endpoints are equivalent iff their iiop counterparts are equivalent, and, if both have non-zero ssl ports, their ssl ports are the same.

Reimplemented from TAO_SSLIOP_Endpoint.

Definition at line 355 of file SSLIOP_Endpoint.cpp.

References SSLIOP::SSL::port, TAO_SSLIOP_Endpoint::ssl_component(), and ACE_OS::strcmp().

00356 {
00357   TAO_Endpoint *endpt = const_cast<TAO_Endpoint *> (other_endpoint);
00358 
00359   TAO_SSLIOP_Endpoint *endpoint =
00360     dynamic_cast<TAO_SSLIOP_Endpoint *> (endpt);
00361 
00362   if (endpoint == 0)
00363     return 0;
00364 
00365   if ((this->ssl_component ().port != 0
00366        && endpoint->ssl_component ().port != 0
00367        && this->ssl_component ().port != endpoint->ssl_component ().port)
00368        || this->qop () < endpoint->qop ())
00369   {
00370     return 0;
00371   }
00372 
00373   // Comparing the underlying iiop endpoints is wrong, as their port
00374   // numbers often may not make sense, or are not being used anyway.
00375   // Therefore, directly comparing the hosts at this point. See also the
00376   // comments in the hash() method
00377   if (this->iiop_endpoint() == 0 || endpoint->iiop_endpoint() == 0)
00378     return 0;
00379 
00380   if ((ACE_OS::strcmp (this->iiop_endpoint()->host (),
00381                        endpoint->iiop_endpoint()->host ()) != 0))
00382     return 0;
00383 
00384   return 1;
00385 }


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