summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-07-19 22:52:35 +0000
committerkirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-07-19 22:52:35 +0000
commit25df7a0aa62ea877637a56c8cb37b57d698b12b6 (patch)
tree5c8e075a17e19dc2cc3511fec12bff4be33ab4d6
parent23e62f52f46ea745b642b0d7010ac33d1d74f1b0 (diff)
downloadATCD-25df7a0aa62ea877637a56c8cb37b57d698b12b6.tar.gz
Added teh accept_strategy to the open method of the base_acceptor
-rw-r--r--TAO/tao/IIOP_Acceptor.cpp50
-rw-r--r--TAO/tao/IIOP_Acceptor.h20
2 files changed, 61 insertions, 9 deletions
diff --git a/TAO/tao/IIOP_Acceptor.cpp b/TAO/tao/IIOP_Acceptor.cpp
index bde9b999deb..fc5f261af0b 100644
--- a/TAO/tao/IIOP_Acceptor.cpp
+++ b/TAO/tao/IIOP_Acceptor.cpp
@@ -32,11 +32,20 @@ ACE_RCSID(tao, IIOP_Acceptor, "$Id$")
TAO_IIOP_Acceptor::TAO_IIOP_Acceptor (void)
: TAO_Acceptor (TAO_IOP_TAG_INTERNET_IOP),
base_acceptor_ (),
+ creation_strategy_ (0),
+ concurrency_strategy_ (0),
version_ (TAO_DEF_GIOP_MAJOR, TAO_DEF_GIOP_MINOR),
orb_core_ (0)
{
}
+TAO_IIOP_Acceptor::~TAO_IIOP_Acceptor (void)
+{
+ delete this->creation_strategy_;
+ delete this->concurrency_strategy_;
+ delete this->accept_strategy_;
+}
+
// TODO =
// 2) For V1.[1,2] there are tagged components
// 3) Create multiple profiles for wild carded endpoints (may be multiple
@@ -141,8 +150,25 @@ TAO_IIOP_Acceptor::open_i (TAO_ORB_Core* orb_core,
const ACE_INET_Addr& addr)
{
this->orb_core_ = orb_core;
+
+ ACE_NEW_RETURN (this->creation_strategy_,
+ TAO_IIOP_CREATION_STRATEGY (this->orb_core_),
+ -1);
+
+ ACE_NEW_RETURN (this->concurrency_strategy_,
+ TAO_IIOP_CONCURRENCY_STRATEGY (this->orb_core_),
+ -1);
+
+ ACE_NEW_RETURN (this->accept_strategy_,
+ TAO_IIOP_ACCEPT_STRATEGY (this->orb_core_,
+ this->tag ()),
+ -1);
- if (this->base_acceptor_.open (orb_core, addr) == -1)
+ if (this->base_acceptor_.open (addr,
+ this->orb_core_->reactor (),
+ this->creation_strategy_,
+ this->accept_strategy_,
+ this->concurrency_strategy_) == -1)
{
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG,
@@ -211,12 +237,26 @@ TAO_IIOP_Acceptor::endpoint_count (void)
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Acceptor<TAO_IIOP_Server_Connection_Handler, TAO_SOCK_ACCEPTOR>;
-template class TAO_Acceptor_Impl<TAO_IIOP_Server_Connection_Handler, TAO_SOCK_ACCEPTOR>;
+template class ACE_Acceptor<TAO_IIOP_Server_Connection_Handler, ACE_SOCK_ACCEPTOR>;
+template class ACE_Strategy_Acceptor<TAO_IIOP_Server_Connection_Handler, ACE_SOCK_ACCEPTOR>;
+template class ACE_Accept_Strategy<TAO_IIOP_Server_Connection_Handler, ACE_SOCK_ACCEPTOR>;
+template class ACE_Creation_Strategy<TAO_IIOP_Server_Connection_Handler>;
+template class ACE_Concurrency_Strategy<TAO_IIOP_Server_Connection_Handler>;
+template class ACE_Scheduling_Strategy<TAO_IIOP_Server_Connection_Handler>;
+template class TAO_Creation_Strategy<TAO_IIOP_Server_Connection_Handler>;
+template class TAO_Concurrency_Strategy<TAO_IIOP_Server_Connection_Handler>;
+template class TAO_Accept_Strategy<TAO_IIOP_Server_Connection_Handler, ACE_SOCK_ACCEPTOR, TAO_IIOP_Connector>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Acceptor<TAO_IIOP_Server_Connection_Handler, TAO_SOCK_ACCEPTOR>
-#pragma instantiate TAO_Acceptor_Impl<TAO_IIOP_Server_Connection_Handler, TAO_SOCK_ACCEPTOR>
+#pragma instantiate ACE_Acceptor<TAO_IIOP_Server_Connection_Handler, ACE_SOCK_ACCEPTOR>
+#pragma instantiate ACE_Strategy_Acceptor<TAO_IIOP_Server_Connection_Handler, ACE_SOCK_ACCEPTOR>
+#pragma instantiate ACE_Accept_Strategy<TAO_IIOP_Server_Connection_Handler, ACE_SOCK_ACCEPTOR>
+#pragma instantiate ACE_Creation_Strategy<TAO_IIOP_Server_Connection_Handler>
+#pragma instantiate ACE_Concurrency_Strategy<TAO_IIOP_Server_Connection_Handler>
+#pragma instantiate ACE_Scheduling_Strategy<TAO_IIOP_Server_Connection_Handler>
+#pragma instantiate TAO_Creation_Strategy<TAO_IIOP_Server_Connection_Handler>
+#pragma instantiate TAO_Concurrency_Strategy<TAO_IIOP_Server_Connection_Handler>
+#pragma instantiate TAO_Accept_Strategy<TAO_IIOP_Server_Connection_Handler, ACE_SOCK_ACCEPTOR, TAO_IIOP_Connector>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/tao/IIOP_Acceptor.h b/TAO/tao/IIOP_Acceptor.h
index c79d7b1de47..fa8246405f4 100644
--- a/TAO/tao/IIOP_Acceptor.h
+++ b/TAO/tao/IIOP_Acceptor.h
@@ -32,6 +32,9 @@
#include "ace/Acceptor.h"
#include "ace/SOCK_Acceptor.h"
+//Forward Declaration.
+class TAO_IIOP_Connector;
+
// TAO IIOP_Acceptor concrete call defination
class TAO_Export TAO_IIOP_Acceptor : public TAO_Acceptor
@@ -43,12 +46,13 @@ class TAO_Export TAO_IIOP_Acceptor : public TAO_Acceptor
// The IIOP-specific bridge class for the concrete acceptor.
//
public:
- // TAO_IIOP_Acceptor (ACE_INET_Addr &addr);
- // Create Acceptor object using addr.
-
+
TAO_IIOP_Acceptor (void);
// Create Acceptor object using addr.
+ ~TAO_IIOP_Acceptor (void);
+ // Destructor.
+
virtual int open (TAO_ORB_Core *orb_core,
int version_major,
int version_minor,
@@ -79,7 +83,10 @@ public:
// @@ Helper method for the implementation repository, should go
// away
- typedef TAO_Acceptor_Impl<TAO_IIOP_Server_Connection_Handler, ACE_SOCK_ACCEPTOR> TAO_IIOP_BASE_ACCEPTOR;
+ typedef ACE_Strategy_Acceptor<TAO_IIOP_Server_Connection_Handler, ACE_SOCK_ACCEPTOR> TAO_IIOP_BASE_ACCEPTOR;
+ typedef TAO_Creation_Strategy<TAO_IIOP_Server_Connection_Handler> TAO_IIOP_CREATION_STRATEGY;
+ typedef TAO_Concurrency_Strategy<TAO_IIOP_Server_Connection_Handler> TAO_IIOP_CONCURRENCY_STRATEGY;
+ typedef TAO_Accept_Strategy<TAO_IIOP_Server_Connection_Handler, ACE_SOCK_ACCEPTOR, TAO_IIOP_Connector> TAO_IIOP_ACCEPT_STRATEGY;
private:
int open_i (TAO_ORB_Core* orb_core,
@@ -90,6 +97,11 @@ private:
TAO_IIOP_BASE_ACCEPTOR base_acceptor_;
// the concrete acceptor, as a pointer to it's base class.
+ TAO_IIOP_CREATION_STRATEGY *creation_strategy_;
+ TAO_IIOP_CONCURRENCY_STRATEGY *concurrency_strategy_;
+ TAO_IIOP_ACCEPT_STRATEGY *accept_strategy_;
+ // Acceptor strategies.
+
ACE_INET_Addr address_;
ACE_CString host_;
// Cache the information about the endpoint serviced by this