1 #include "tao/Strategies/DIOP_Factory.h"
3 #if defined (TAO_HAS_DIOP) && (TAO_HAS_DIOP != 0)
5 #include "tao/Strategies/DIOP_Acceptor.h"
6 #include "tao/Strategies/DIOP_Connector.h"
8 #include "tao/ORB_Constants.h"
10 #include "ace/OS_NS_strings.h"
12 static const char the_prefix
[] = "diop";
14 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
16 TAO_DIOP_Protocol_Factory::TAO_DIOP_Protocol_Factory ()
17 : TAO_Protocol_Factory (TAO_TAG_DIOP_PROFILE
)
22 TAO_DIOP_Protocol_Factory::match_prefix (const ACE_CString
&prefix
)
24 // Check for the proper prefix for this protocol.
25 return (ACE_OS::strcasecmp (prefix
.c_str (), ::the_prefix
) == 0);
29 TAO_DIOP_Protocol_Factory::prefix () const
35 TAO_DIOP_Protocol_Factory::options_delimiter () const
41 TAO_DIOP_Protocol_Factory::make_acceptor ()
43 TAO_Acceptor
*acceptor
= 0;
45 ACE_NEW_RETURN (acceptor
,
53 TAO_DIOP_Protocol_Factory::init (int /* argc */, ACE_TCHAR
* /* argv */ [])
59 TAO_DIOP_Protocol_Factory::make_connector ()
61 TAO_Connector
*connector
= 0;
63 ACE_NEW_RETURN (connector
,
70 TAO_DIOP_Protocol_Factory::requires_explicit_endpoint () const
72 // This switch is actually meant to distinguish between pluggable
73 // protocols which are able to clean up their endpoints and such
74 // that aren't. E.g. UIOP will leave files, it therefore returns 1,
75 // IIOP cleans up its endpoint resources, which therefore return 0.
77 // DIOP does clean up endpoint resources, but as DIOP is only
78 // suitable for special environments, e.g. it supports only one-ways,
79 // it returns 1 for an other reason than resource clean-up.
85 ACE_STATIC_SVC_DEFINE (TAO_DIOP_Protocol_Factory
,
86 ACE_TEXT ("DIOP_Factory"),
88 &ACE_SVC_NAME (TAO_DIOP_Protocol_Factory
),
89 ACE_Service_Type::DELETE_THIS
|
90 ACE_Service_Type::DELETE_OBJ
,
93 ACE_FACTORY_DEFINE (TAO_Strategies
, TAO_DIOP_Protocol_Factory
)
95 TAO_END_VERSIONED_NAMESPACE_DECL
97 #endif /* TAO_HAS_DIOP && TAO_HAS_DIOP != 0 */