Transport_Connector.cpp File Reference

#include "tao/Transport_Connector.h"
#include "tao/Transport.h"
#include "tao/ORB_Core.h"
#include "tao/MProfile.h"
#include "tao/Profile.h"
#include "tao/Thread_Lane_Resources.h"
#include "tao/debug.h"
#include "tao/Connect_Strategy.h"
#include "tao/LF_Multi_Event.h"
#include "tao/Client_Strategy_Factory.h"
#include "tao/Connection_Handler.h"
#include "tao/Profile_Transport_Resolver.h"
#include "tao/Wait_Strategy.h"
#include "tao/SystemException.h"
#include "tao/Endpoint.h"
#include "tao/Base_Transport_Property.h"
#include "ace/OS_NS_string.h"
Include dependency graph for Transport_Connector.cpp:

Go to the source code of this file.

Functions

 ACE_RCSID (tao, Connector,"$Id: Transport_Connector.cpp 85406 2009-05-20 09:07:56Z johnnyw $") namespace

Function Documentation

ACE_RCSID ( tao  ,
Connector  ,
"$Id: Transport_Connector.cpp 85406 2009-05-20 09:07:56Z johnnyw $"   
)

Turn off the guard.

Definition at line 26 of file Transport_Connector.cpp.

00028                : Transport_Connector.cpp 85406 2009-05-20 09:07:56Z johnnyw $")
00029 
00030 namespace
00031 {
00032   class TransportCleanupGuard
00033   {
00034   public:
00035     // Constructor.  Initially assume that we're going to clean up the
00036     // transport upon destruction.
00037     TransportCleanupGuard (TAO_Transport *tp)
00038       : tp_ (tp),
00039         awake_ (true)
00040     {
00041     }
00042 
00043     ~TransportCleanupGuard ()
00044     {
00045       if (this->awake_ && this->tp_)
00046         {
00047           // Purge from the connection cache.  If we are not in the
00048           // cache, this does nothing.
00049           this->tp_->purge_entry ();
00050 
00051           // Close the handler and remove the reference.
00052           this->tp_->close_connection ();
00053           this->tp_->remove_reference ();
00054         }
00055     }
00056 
00057     /// Turn off the guard.
00058     void clear ()
00059     {
00060       this->awake_ = false;
00061     }
00062 
00063   private:
00064     TAO_Transport * const tp_;
00065     bool awake_;
00066   };
00067 }

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Sun Nov 22 23:25:43 2009 for TAO by  doxygen 1.6.1