summaryrefslogtreecommitdiff
path: root/TAO/tao/IIOP_Factory.cpp
diff options
context:
space:
mode:
authorzhangw <zhangw@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-01-15 23:26:37 +0000
committerzhangw <zhangw@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-01-15 23:26:37 +0000
commit54191a377b67a851dc03c754a23cb8aaca6b18b2 (patch)
tree3ecfcb7e0be56c06857e3faf607c85abb2988120 /TAO/tao/IIOP_Factory.cpp
parenta6b6f9642d622fb9e274ef1e34f3e848ed3ae9dc (diff)
downloadATCD-54191a377b67a851dc03c754a23cb8aaca6b18b2.tar.gz
Creating a branch of ACE+TAO+CIAO for OCI RT 9734
Diffstat (limited to 'TAO/tao/IIOP_Factory.cpp')
-rw-r--r--TAO/tao/IIOP_Factory.cpp95
1 files changed, 95 insertions, 0 deletions
diff --git a/TAO/tao/IIOP_Factory.cpp b/TAO/tao/IIOP_Factory.cpp
new file mode 100644
index 00000000000..48d0c9e256c
--- /dev/null
+++ b/TAO/tao/IIOP_Factory.cpp
@@ -0,0 +1,95 @@
+#include "tao/IIOP_Factory.h"
+
+#if defined (TAO_HAS_IIOP) && (TAO_HAS_IIOP != 0)
+
+#include "tao/IIOP_Acceptor.h"
+#include "tao/IIOP_Connector.h"
+#include "tao/IOP_IORC.h"
+#include "ace/OS_NS_strings.h"
+
+ACE_RCSID (tao,
+ IIOP_Factory,
+ "$Id$")
+
+
+static const char the_prefix[] = "iiop";
+
+TAO_BEGIN_VERSIONED_NAMESPACE_DECL
+
+TAO_IIOP_Protocol_Factory::TAO_IIOP_Protocol_Factory (void)
+ : TAO_Protocol_Factory (IOP::TAG_INTERNET_IOP)
+{
+}
+
+TAO_IIOP_Protocol_Factory::~TAO_IIOP_Protocol_Factory (void)
+{
+}
+
+int
+TAO_IIOP_Protocol_Factory::match_prefix (const ACE_CString &prefix)
+{
+ // Check for the proper prefix for this protocol.
+ return (ACE_OS::strcasecmp (prefix.c_str (), ::the_prefix) == 0);
+}
+
+const char *
+TAO_IIOP_Protocol_Factory::prefix (void) const
+{
+ return ::the_prefix;
+}
+
+char
+TAO_IIOP_Protocol_Factory::options_delimiter (void) const
+{
+ return '/';
+}
+
+TAO_Acceptor *
+TAO_IIOP_Protocol_Factory::make_acceptor (void)
+{
+ TAO_Acceptor *acceptor = 0;
+
+ ACE_NEW_RETURN (acceptor,
+ TAO_IIOP_Acceptor,
+ 0);
+
+ return acceptor;
+}
+
+int
+TAO_IIOP_Protocol_Factory::init (int /* argc */,
+ ACE_TCHAR* /* argv */ [])
+{
+ return 0;
+}
+
+TAO_Connector *
+TAO_IIOP_Protocol_Factory::make_connector (void)
+{
+ TAO_Connector *connector = 0;
+
+ ACE_NEW_RETURN (connector,
+ TAO_IIOP_Connector,
+ 0);
+ return connector;
+}
+
+int
+TAO_IIOP_Protocol_Factory::requires_explicit_endpoint (void) const
+{
+ return 0;
+}
+
+TAO_END_VERSIONED_NAMESPACE_DECL
+
+ACE_STATIC_SVC_DEFINE (TAO_IIOP_Protocol_Factory,
+ ACE_TEXT ("IIOP_Factory"),
+ ACE_SVC_OBJ_T,
+ &ACE_SVC_NAME (TAO_IIOP_Protocol_Factory),
+ ACE_Service_Type::DELETE_THIS |
+ ACE_Service_Type::DELETE_OBJ,
+ 0)
+
+ACE_FACTORY_DEFINE (TAO, TAO_IIOP_Protocol_Factory)
+
+#endif /* TAO_HAS_IIOP && TAO_HAS_IIOP != 0 */