Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / Default_Thread_Lane_Resources_Manager.cpp
blobdd5dced5afc9a5c49a444aee2340049c69fee041
1 // -*- C++ -*-
2 #include "tao/Default_Thread_Lane_Resources_Manager.h"
3 #include "tao/Thread_Lane_Resources.h"
4 #include "tao/Exception.h"
5 #include "tao/ORB_Core.h"
6 #include "ace/Log_Msg.h"
8 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
10 TAO_Default_Thread_Lane_Resources_Manager::TAO_Default_Thread_Lane_Resources_Manager (TAO_ORB_Core &orb_core)
11 : TAO_Thread_Lane_Resources_Manager (orb_core),
12 lane_resources_ (new TAO_Thread_Lane_Resources (orb_core))
16 TAO_Default_Thread_Lane_Resources_Manager::~TAO_Default_Thread_Lane_Resources_Manager ()
18 // Delete the default resources.
19 delete this->lane_resources_;
22 int
23 TAO_Default_Thread_Lane_Resources_Manager::open_default_resources ()
25 TAO_ORB_Parameters * const params =
26 this->orb_core_->orb_params ();
28 TAO_EndpointSet endpoint_set;
30 params->get_endpoint_set (TAO_DEFAULT_LANE, endpoint_set);
32 bool ignore_address = false;
34 int const result =
35 this->lane_resources_->open_acceptor_registry (endpoint_set, ignore_address);
37 return result;
40 void
41 TAO_Default_Thread_Lane_Resources_Manager::finalize ()
43 // Finalize default resources.
44 this->lane_resources_->finalize ();
47 TAO_Thread_Lane_Resources &
48 TAO_Default_Thread_Lane_Resources_Manager::lane_resources ()
50 return *this->lane_resources_;
53 TAO_Thread_Lane_Resources &
54 TAO_Default_Thread_Lane_Resources_Manager::default_lane_resources ()
56 return this->lane_resources ();
59 void
60 TAO_Default_Thread_Lane_Resources_Manager::shutdown_reactor ()
62 this->lane_resources_->shutdown_reactor ();
65 void
66 TAO_Default_Thread_Lane_Resources_Manager::close_all_transports ()
68 this->lane_resources_->close_all_transports ();
71 int
72 TAO_Default_Thread_Lane_Resources_Manager::is_collocated (const TAO_MProfile &mprofile)
74 return this->lane_resources_->is_collocated (mprofile);
77 // -------------------------------------------------------
79 TAO_Default_Thread_Lane_Resources_Manager_Factory::
80 ~TAO_Default_Thread_Lane_Resources_Manager_Factory ()
84 TAO_Thread_Lane_Resources_Manager *
85 TAO_Default_Thread_Lane_Resources_Manager_Factory::create_thread_lane_resources_manager (TAO_ORB_Core &core)
87 TAO_Thread_Lane_Resources_Manager *manager = nullptr;
89 /// Create the Default Thread Lane Resources Manager.
90 ACE_NEW_RETURN (manager,
91 TAO_Default_Thread_Lane_Resources_Manager (core),
92 nullptr);
94 return manager;
97 // -------------------------------------------------------
99 ACE_STATIC_SVC_DEFINE (TAO_Default_Thread_Lane_Resources_Manager_Factory,
100 ACE_TEXT ("Default_Thread_Lane_Resources_Manager_Factory"),
101 ACE_SVC_OBJ_T,
102 &ACE_SVC_NAME (TAO_Default_Thread_Lane_Resources_Manager_Factory),
103 ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ,
105 ACE_FACTORY_DEFINE (TAO, TAO_Default_Thread_Lane_Resources_Manager_Factory)
107 TAO_END_VERSIONED_NAMESPACE_DECL