Connector_Registry.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Connector_Registry.h
00006  *
00007  *  $Id: Connector_Registry.h 76995 2007-02-11 12:51:42Z johnnyw $
00008  *
00009  *  Interface for the TAO Connector Registry
00010  *
00011  *  @author  Fred Kuhns <fredk@cs.wustl.edu>
00012  */
00013 //=============================================================================
00014 
00015 #ifndef TAO_CONNECTOR_REGISTRY_H
00016 #define TAO_CONNECTOR_REGISTRY_H
00017 #include /**/ "ace/pre.h"
00018 
00019 #include /**/ "tao/TAO_Export.h"
00020 
00021 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00022 # pragma once
00023 #endif /* ACE_LACKS_PRAGMA_ONCE */
00024 
00025 #include "tao/Basic_Types.h"
00026 #include "ace/Global_Macros.h"
00027 
00028 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00029 
00030 // Forward declarations.
00031 class TAO_ORB_Core;
00032 class TAO_Connector;
00033 class TAO_MProfile;
00034 class TAO_Profile;
00035 class TAO_InputCDR;
00036 
00037 typedef TAO_Connector** TAO_ConnectorSetIterator;
00038 
00039 /**
00040  * @class TAO_Connector_Registry
00041  *
00042  * @brief Per-ORB TAO Connector Registry
00043  *
00044  * Connector Registry and Generic Connector interface definitions.
00045  * All loaded ESIOP or GIOP connector bridges must register with
00046  * this object.
00047  * This class is able to dynamically load a set of
00048  * concrete protocol connectors which have registered with the service
00049  * configurator and added their Factory name to the Resource_Factory
00050  * line of the svc.conf file.
00051  */
00052 class TAO_Export TAO_Connector_Registry
00053 {
00054 public:
00055   ///  Default constructor.
00056   TAO_Connector_Registry (void);
00057 
00058   ///  Default destructor.
00059   ~TAO_Connector_Registry (void);
00060 
00061   /// Return the connector bridges
00062   TAO_Connector *get_connector (CORBA::ULong tag) const;
00063 
00064   /// Initialize all registered connectors.
00065   int open (TAO_ORB_Core *orb_core);
00066 
00067   /// Close all open connectors.
00068   int close_all (void);
00069 
00070   /// Parse a string containing a URL style IOR and return an
00071   /// MProfile.
00072   int make_mprofile (const char *ior,
00073                      TAO_MProfile &mprofile
00074                     );
00075 
00076   /// Create a profile based on the contents of @a cdr
00077   TAO_Profile* create_profile (TAO_InputCDR& cdr);
00078 
00079   /// Obtain the object key delimiter used by the protocol specified in
00080   /// the provided URL style IOR.
00081   char object_key_delimiter (const char *ior);
00082 
00083   // = Iterator.
00084   TAO_ConnectorSetIterator begin (void) const;
00085   TAO_ConnectorSetIterator end (void) const;
00086 
00087 private:
00088   // Disallow copying and assignment.
00089   TAO_Connector_Registry (const TAO_Connector_Registry&);
00090   void operator= (const TAO_Connector_Registry&);
00091 
00092 private:
00093   /// List of connectors that are currently open.
00094   TAO_Connector** connectors_;
00095 
00096   /// Number of connectors that are currently open.
00097   size_t size_;
00098 };
00099 
00100 TAO_END_VERSIONED_NAMESPACE_DECL
00101 
00102 #if defined(__ACE_INLINE__)
00103 #include "tao/Connector_Registry.inl"
00104 #endif /* __ACE_INLINE__ */
00105 
00106 #include /**/ "ace/post.h"
00107 #endif /* TAO_CONNECTOR_REGISTRY_H */

Generated on Tue Feb 2 17:37:51 2010 for TAO by  doxygen 1.4.7