UIPMC_Factory.cpp

Go to the documentation of this file.
00001 // UIPMC_Factory.cpp,v 1.9 2006/05/23 16:19:45 mitza Exp
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   // Check for the proper prefix for this protocol.
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 /* argc */,
00061                                   char* /* argv */ [])
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   // A multicast endpoint can't be picked automatically in the
00081   // pluggable protocol framework.  It must be determined from
00082   // the UIPMC profile that has the group reference.  This information
00083   // is either specified by the user or generated by the
00084   // multicast group manager or other UIPMC profile generation
00085   // interface.
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)

Generated on Thu Nov 9 14:03:34 2006 for TAO_PortableGroup by doxygen 1.3.6