Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Connector_Registry.h

Go to the documentation of this file.
00001 // This may look like C, but it's really -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file     Connector_Registry.h
00006  *
00007  *  $Id: Connector_Registry.h,v 1.1.1.4 2003/02/21 18:36:44 chad Exp $
00008  *
00009  *   Interface for the TAO Connector Registry
00010  *
00011  *
00012  *  @author  Fred Kuhns <fredk@cs.wustl.edu>
00013  */
00014 //=============================================================================
00015 
00016 
00017 #ifndef TAO_CONNECTOR_REGISTRY_H
00018 #define TAO_CONNECTOR_REGISTRY_H
00019 #include "ace/pre.h"
00020 
00021 #include "corbafwd.h"
00022 
00023 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00024 # pragma once
00025 #endif /* ACE_LACKS_PRAGMA_ONCE */
00026 
00027 #include "Endpoint.h"
00028 
00029 // Forward declarations.
00030 class ACE_Addr;
00031 class ACE_Reactor;
00032 
00033 class TAO_ORB_Core;
00034 class TAO_Connector;
00035 
00036 class TAO_Transport_Descriptor_Interface;
00037 class TAO_Stub;
00038 class TAO_MProfile;
00039 class TAO_Profile;
00040 class TAO_Resource_Factory;
00041 class TAO_GIOP_Invocation;
00042 
00043 typedef TAO_Connector** TAO_ConnectorSetIterator;
00044 
00045 /**
00046  * @class TAO_Connector_Registry
00047  *
00048  * @brief Per-ORB TAO Connector Registry
00049  *
00050  * Connector Registry and Generic Connector interface definitions.
00051  * All loaded ESIOP or GIOP connector bridges must register with
00052  * this object.
00053  * This class is able to dynamically load a set of
00054  * concrete protocol connectors which have registered with the service
00055  * configurator and added their Factory name to the Resource_Factory
00056  * line of the svc.conf file.
00057  */
00058 class TAO_Export TAO_Connector_Registry
00059 {
00060 public:
00061   ///  Default constructor.
00062   TAO_Connector_Registry (void);
00063 
00064   ///  Default destructor.
00065   ~TAO_Connector_Registry (void);
00066 
00067   /// Return the connector bridges
00068   TAO_Connector *get_connector (CORBA::ULong tag);
00069   TAO_Connector *get_connector (TAO_Endpoint *ep);
00070 
00071   /// Initialize all registered connectors.
00072   int open (TAO_ORB_Core *orb_core);
00073 
00074   /// Close all open connectors.
00075   int close_all (void);
00076 
00077 
00078   /**
00079    * @@ todo: This method needs to be removed. There should be no need
00080    * for the registry to establish connections.
00081    *
00082    * This is where the transport protocol is selected based on some
00083    * policy.  This member will call the connect member of the
00084    * TAO_Connector class which in turn will call the concrete
00085    * connector.
00086    */
00087   int connect (TAO_GIOP_Invocation *invocation,
00088                TAO_Transport_Descriptor_Interface *desc
00089                ACE_ENV_ARG_DECL);
00090 
00091   /// Parse a string containing a URL style IOR and return an
00092   /// MProfile.
00093   int make_mprofile (const char *ior,
00094                      TAO_MProfile &mprofile
00095                      ACE_ENV_ARG_DECL);
00096 
00097   /// Create a profile based on the contents of <cdr>
00098   TAO_Profile* create_profile (TAO_InputCDR& cdr);
00099 
00100   /// Obtain the object key delimiter used by the protocol specified in
00101   /// the provided URL style IOR.
00102   char object_key_delimiter (const char *ior);
00103 
00104   // = Iterator.
00105   TAO_ConnectorSetIterator begin (void);
00106   TAO_ConnectorSetIterator end (void);
00107 
00108 private:
00109   // Prohibited
00110   ACE_UNIMPLEMENTED_FUNC (TAO_Connector_Registry (const TAO_Connector_Registry&))
00111   ACE_UNIMPLEMENTED_FUNC (void operator= (const TAO_Connector_Registry&))
00112 
00113 private:
00114   /// List of connectors that are currently open.
00115   TAO_Connector** connectors_;
00116 
00117   /// Number of connectors that are currently open.
00118   size_t size_;
00119 };
00120 
00121 #if defined(__ACE_INLINE__)
00122 #include "tao/Connector_Registry.i"
00123 #endif /* __ACE_INLINE__ */
00124 
00125 #include "ace/post.h"
00126 #endif /* TAO_CONNECTOR_REGISTRY_H */

Generated on Mon Jun 16 13:48:06 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002