// This may look like C, but it's really -*- C++ -*- // $Id$ // ============================================================================ // // = LIBRARY // TAO // // = FILENAME // Acceptor_Impl.h // // = AUTHOR // Carlos O'Ryan // Ossama Othman // // ============================================================================ #ifndef TAO_ACCEPTOR_IMPL_H #define TAO_ACCEPTOR_IMPL_H #include "ace/pre.h" #include "ace/Acceptor.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ #include "tao/corbafwd.h" // Forward declarations. class TAO_ORB_Core; template class TAO_Creation_Strategy : public ACE_Creation_Strategy { // = TITLE // Creates a Svc_Handler and set the ORB_Core pointer on it. public: TAO_Creation_Strategy (TAO_ORB_Core *orb_core, void *arg = 0, CORBA::Boolean flag = 0); // Constructor. parameter is used to pass any special // state/info to the service handler upon creation. Currently used // by IIOP and UIOP to pass protocol configuration properties. int make_svc_handler (SVC_HANDLER *&sh); // Create a SVC_HANDLER and set the ORB_Core pointer on it. protected: TAO_ORB_Core *orb_core_; // Pointer to the ORB Core. void *arg_; // Some info/state to be passed to the service handler we create. CORBA::Boolean lite_flag_; // Should we use the Lite version for any protocol? }; template class TAO_Concurrency_Strategy : public ACE_Concurrency_Strategy { // = TITLE // Activates the Svc_Handler, and then if specified by the // TAO_Server_Strategy_Factory, it activates the Svc_Handler to // run in its own thread. public: TAO_Concurrency_Strategy (TAO_ORB_Core *orb_core); // Constructor. int activate_svc_handler (SVC_HANDLER *svc_handler, void *arg); // Activates the Svc_Handler, and then if specified by the // TAO_Server_Strategy_Factory, it activates the Svc_Handler to run // in its own thread. protected: TAO_ORB_Core *orb_core_; // Pointer to the ORB Core. }; template class TAO_Accept_Strategy : public ACE_Accept_Strategy { public: TAO_Accept_Strategy (TAO_ORB_Core *orb_core); // Constructor. int open (const ACE_PEER_ACCEPTOR_ADDR &local_addr, int restart = 0); // Initialize the with . If the // process runs out of handles, purge some "old" connections. int accept_svc_handler (SVC_HANDLER *svc_handler); // Delegates to the method of the PEER_ACCEPTOR. If the // process runs out of handles, purge some "old" connections. protected: #if defined (TAO_USES_ROBUST_CONNECTION_MGMT) int out_of_sockets_handler (void); // Handler which deals with purging "old" connections. #endif /* TAO_USES_ROBUST_CONNECTION_MGMT */ typedef ACE_Accept_Strategy ACCEPT_STRATEGY_BASE; // Base class. TAO_ORB_Core *orb_core_; // Pointer to the ORB Core. }; #if defined(__ACE_INLINE__) #include "tao/Acceptor_Impl.i" #endif /* __ACE_INLINE__ */ #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "tao/Acceptor_Impl.cpp" #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) #pragma implementation ("Acceptor_Impl.cpp") #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include "ace/post.h" #endif /* TAO_ACCEPTOR_IMPL_H */