00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef TAO_CONNECTOR_H
00017 #define TAO_CONNECTOR_H
00018
00019 #include "ace/pre.h"
00020 #include "ace/CORBA_macros.h"
00021
00022 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00023 # pragma once
00024 #endif
00025
00026 #include "tao/TAO_Export.h"
00027 #include "tao/Basic_Types.h"
00028
00029 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00030 class ACE_Time_Value;
00031 ACE_END_VERSIONED_NAMESPACE_DECL
00032
00033 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00034
00035 class TAO_Transport_Descriptor_Interface;
00036 class TAO_InputCDR;
00037 class TAO_Endpoint;
00038 class TAO_Profile;
00039 class TAO_MProfile;
00040 class TAO_ORB_Core;
00041 class TAO_Connect_Strategy;
00042 class TAO_Transport;
00043 class TAO_Connection_Handler;
00044 class TAO_LF_Multi_Event;
00045
00046 namespace TAO
00047 {
00048 class Profile_Transport_Resolver;
00049 }
00050
00051 namespace CORBA
00052 {
00053 class Environment;
00054 }
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071 class TAO_Export TAO_Connector
00072 {
00073 public:
00074
00075
00076 TAO_Connector (CORBA::ULong tag);
00077
00078
00079 virtual ~TAO_Connector (void);
00080
00081
00082
00083
00084
00085
00086
00087
00088 CORBA::ULong tag (void) const;
00089
00090
00091
00092 int make_mprofile (
00093 const char *ior,
00094 TAO_MProfile &mprofile
00095 ACE_ENV_ARG_DECL);
00096
00097
00098
00099
00100
00101
00102
00103 virtual TAO_Profile * corbaloc_scan (const char *ior,
00104 size_t &len
00105 ACE_ENV_ARG_DECL);
00106
00107
00108 virtual int open (
00109 TAO_ORB_Core *orb_core) = 0;
00110
00111
00112 virtual int close (void) = 0;
00113
00114
00115
00116
00117
00118
00119 virtual TAO_Transport* connect (
00120 TAO::Profile_Transport_Resolver *r,
00121 TAO_Transport_Descriptor_Interface *desc,
00122 ACE_Time_Value *timeout
00123 ACE_ENV_ARG_DECL);
00124
00125
00126
00127 virtual TAO_Transport* parallel_connect (
00128 TAO::Profile_Transport_Resolver *r,
00129 TAO_Transport_Descriptor_Interface *desc,
00130 ACE_Time_Value *timeout
00131 ACE_ENV_ARG_DECL);
00132
00133
00134
00135 virtual TAO_Profile *create_profile (
00136 TAO_InputCDR& cdr) = 0;
00137
00138
00139
00140 virtual int check_prefix (
00141 const char *endpoint) = 0;
00142
00143
00144 virtual char object_key_delimiter (void) const = 0;
00145
00146
00147
00148 protected:
00149
00150
00151
00152 virtual int supports_parallel_connects (void) const;
00153
00154
00155 virtual TAO_Profile *make_profile (ACE_ENV_SINGLE_ARG_DECL) = 0;
00156
00157
00158
00159 virtual int set_validate_endpoint (TAO_Endpoint *endpoint) = 0;
00160
00161
00162 virtual TAO_Transport* make_connection (
00163 TAO::Profile_Transport_Resolver *r,
00164 TAO_Transport_Descriptor_Interface &desc,
00165 ACE_Time_Value *timeout) = 0;
00166
00167
00168
00169 virtual TAO_Transport* make_parallel_connection (
00170 TAO::Profile_Transport_Resolver *r,
00171 TAO_Transport_Descriptor_Interface &desc,
00172 ACE_Time_Value *timeout);
00173
00174
00175 virtual int cancel_svc_handler (
00176 TAO_Connection_Handler *svc_handler) = 0;
00177
00178
00179
00180
00181
00182
00183
00184 virtual int check_connection_closure (
00185 TAO_Connection_Handler *connection_handler);
00186
00187
00188
00189
00190
00191
00192
00193 virtual bool wait_for_connection_completion(
00194 TAO::Profile_Transport_Resolver *r,
00195 TAO_Transport *&transport,
00196 ACE_Time_Value *timeout);
00197
00198
00199
00200
00201 virtual bool wait_for_connection_completion(
00202 TAO::Profile_Transport_Resolver *r,
00203 TAO_Transport *&the_winner,
00204 TAO_Transport **transport,
00205 unsigned int count,
00206 TAO_LF_Multi_Event *mev,
00207 ACE_Time_Value *timeout);
00208
00209
00210 void orb_core (TAO_ORB_Core *orb_core);
00211
00212
00213 int create_connect_strategy (void);
00214
00215
00216 TAO_ORB_Core *orb_core (void);
00217
00218 protected:
00219
00220
00221 TAO_Connect_Strategy *active_connect_strategy_;
00222
00223 private:
00224
00225
00226 CORBA::ULong const tag_;
00227
00228
00229 TAO_ORB_Core *orb_core_;
00230
00231
00232 };
00233
00234
00235
00236 TAO_END_VERSIONED_NAMESPACE_DECL
00237
00238 #if defined (__ACE_INLINE__)
00239 # include "tao/Transport_Connector.inl"
00240 #endif
00241
00242 #include "ace/post.h"
00243 #endif