00001
00002
00003 #include "orbsvcs/PortableGroup/UIPMC_Factory.h"
00004 #include "orbsvcs/PortableGroup/UIPMC_Acceptor.h"
00005 #include "orbsvcs/PortableGroup/UIPMC_Connector.h"
00006 #include "ace/OS_NS_strings.h"
00007 #include "tao/ORB_Constants.h"
00008
00009 ACE_RCSID (PortableGroup,
00010 UIPMC_Factory,
00011 "UIPMC_Factory.cpp,v 1.9 2006/05/23 16:19:45 mitza Exp")
00012
00013 static const char the_prefix[] = "uipmc";
00014
00015 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00016
00017 TAO_UIPMC_Protocol_Factory::TAO_UIPMC_Protocol_Factory (void)
00018 : TAO_Protocol_Factory (IOP::TAG_UIPMC),
00019 major_ (TAO_DEF_GIOP_MAJOR),
00020 minor_ (TAO_DEF_GIOP_MINOR)
00021 {
00022 }
00023
00024 TAO_UIPMC_Protocol_Factory::~TAO_UIPMC_Protocol_Factory (void)
00025 {
00026 }
00027
00028 int
00029 TAO_UIPMC_Protocol_Factory::match_prefix (const ACE_CString &prefix)
00030 {
00031
00032 return (ACE_OS::strcasecmp (prefix.c_str (), ::the_prefix) == 0);
00033 }
00034
00035 const char *
00036 TAO_UIPMC_Protocol_Factory::prefix (void) const
00037 {
00038 return ::the_prefix;
00039 }
00040
00041 char
00042 TAO_UIPMC_Protocol_Factory::options_delimiter (void) const
00043 {
00044 return '/';
00045 }
00046
00047 TAO_Acceptor *
00048 TAO_UIPMC_Protocol_Factory::make_acceptor (void)
00049 {
00050 TAO_Acceptor *acceptor = 0;
00051
00052 ACE_NEW_RETURN (acceptor,
00053 TAO_UIPMC_Acceptor,
00054 0);
00055
00056 return acceptor;
00057 }
00058
00059 int
00060 TAO_UIPMC_Protocol_Factory::init (int ,
00061 char* [])
00062 {
00063 return 0;
00064 }
00065
00066 TAO_Connector *
00067 TAO_UIPMC_Protocol_Factory::make_connector (void)
00068 {
00069 TAO_Connector *connector = 0;
00070
00071 ACE_NEW_RETURN (connector,
00072 TAO_UIPMC_Connector,
00073 0);
00074 return connector;
00075 }
00076
00077 int
00078 TAO_UIPMC_Protocol_Factory::requires_explicit_endpoint (void) const
00079 {
00080
00081
00082
00083
00084
00085
00086 return 1;
00087 }
00088
00089 TAO_END_VERSIONED_NAMESPACE_DECL
00090
00091 ACE_STATIC_SVC_DEFINE (TAO_UIPMC_Protocol_Factory,
00092 ACE_TEXT ("UIPMC_Factory"),
00093 ACE_SVC_OBJ_T,
00094 &ACE_SVC_NAME (TAO_UIPMC_Protocol_Factory),
00095 ACE_Service_Type::DELETE_THIS |
00096 ACE_Service_Type::DELETE_OBJ,
00097 0)
00098
00099 ACE_FACTORY_DEFINE (TAO_PortableGroup, TAO_UIPMC_Protocol_Factory)