1 #include "tao/Asynch_Reply_Dispatcher_Base.h"
2 #include "tao/Pluggable_Messaging_Utils.h"
3 #include "tao/ORB_Core.h"
5 #include "tao/Transport.h"
7 #if !defined (__ACE_INLINE__)
8 #include "tao/Asynch_Reply_Dispatcher_Base.inl"
9 #endif /* __ACE_INLINE__ */
11 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
14 TAO_Asynch_Reply_Dispatcher_Base::TAO_Asynch_Reply_Dispatcher_Base (
15 TAO_ORB_Core
*orb_core
,
16 ACE_Allocator
*allocator
)
17 : TAO_Reply_Dispatcher (allocator
)
19 ACE_Message_Block::MB_DATA
,
21 orb_core
->input_cdr_buffer_allocator (),
22 orb_core
->locking_strategy (),
23 ACE_Message_Block::DONT_DELETE
,
24 orb_core
->input_cdr_dblock_allocator ()),
26 ACE_Message_Block::MB_DATA
,
31 , transport_ (nullptr)
33 , is_reply_dispatched_ (false)
35 // @@ NOTE: Need a separate option for this..
37 orb_core
->resource_factory ()->create_cached_connection_lock ();
41 TAO_Asynch_Reply_Dispatcher_Base::~TAO_Asynch_Reply_Dispatcher_Base ()
43 // Release the transport that we own
44 if (this->transport_
!= nullptr)
45 this->transport_
->remove_reference ();
52 TAO_Asynch_Reply_Dispatcher_Base::transport (TAO_Transport
*t
)
54 if (this->transport_
!= nullptr)
55 this->transport_
->remove_reference ();
59 this->transport_
->add_reference ();
63 TAO_Asynch_Reply_Dispatcher_Base::try_dispatch_reply ()
65 if (this->is_reply_dispatched_
)
71 ACE_GUARD_RETURN (ACE_Lock
,
76 if (!this->is_reply_dispatched_
)
78 this->is_reply_dispatched_
= true;
86 TAO_END_VERSIONED_NAMESPACE_DECL