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