Bind_Dispatcher_Guard.cpp

Go to the documentation of this file.
00001 // This may look like C, but it's really -*- C++ -*-
00002 // $Id: Bind_Dispatcher_Guard.cpp 77638 2007-03-09 12:57:37Z johnnyw $
00003 
00004 #include "tao/Bind_Dispatcher_Guard.h"
00005 
00006 #if !defined (__ACE_INLINE__)
00007 # include "tao/Bind_Dispatcher_Guard.inl"
00008 #endif /* ! __ACE_INLINE__ */
00009 
00010 ACE_RCSID (tao,
00011            Bind_Dispatcher_Guard,
00012            "$Id: Bind_Dispatcher_Guard.cpp 77638 2007-03-09 12:57:37Z johnnyw $")
00013 
00014 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00015 
00016 TAO_Bind_Dispatcher_Guard::TAO_Bind_Dispatcher_Guard (CORBA::ULong request_id,
00017                                                       TAO_Reply_Dispatcher *rd,
00018                                                       TAO_Transport_Mux_Strategy *tms)
00019   : status_(TAO_Bind_Dispatcher_Guard::UNBIND),
00020     request_id_(request_id),
00021     rd_(rd),
00022     tms_(tms)
00023 {
00024   int const retval =
00025     this->tms_->bind_dispatcher (this->request_id_, this->rd_);
00026 
00027   if (retval == -1)
00028     this->status_ =
00029       TAO_Bind_Dispatcher_Guard::NO_UNBIND;
00030 }
00031 
00032 TAO_Bind_Dispatcher_Guard::~TAO_Bind_Dispatcher_Guard (void)
00033 {
00034   // We try unbinding. If it works it works, else cant do much about
00035   // it..
00036   if (this->status_ == TAO_Bind_Dispatcher_Guard::UNBIND)
00037     (void)this->tms_->unbind_dispatcher (this->request_id_);
00038 }
00039 
00040 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Sun Jan 27 13:07:31 2008 for TAO by doxygen 1.3.6