00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef TAO_IIOP_CONNECTOR_H
00019 #define TAO_IIOP_CONNECTOR_H
00020
00021 #include "ace/pre.h"
00022
00023 #include "tao/orbconf.h"
00024
00025 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00026 # pragma once
00027 #endif
00028
00029 #if defined (TAO_HAS_IIOP) && (TAO_HAS_IIOP != 0)
00030
00031 #include "tao/Transport_Connector.h"
00032 #include "tao/Connector_Impl.h"
00033 #include "tao/IIOP_Connection_Handler.h"
00034
00035 #include "ace/SOCK_Connector.h"
00036 #include "ace/Connector.h"
00037
00038 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00039
00040 class TAO_IIOP_Endpoint;
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053 class TAO_Export TAO_IIOP_Connector : public TAO_Connector
00054 {
00055 public:
00056
00057
00058 TAO_IIOP_Connector (void);
00059
00060
00061 ~TAO_IIOP_Connector (void);
00062
00063
00064
00065 int open (TAO_ORB_Core *orb_core);
00066 int close (void);
00067 TAO_Profile *create_profile (TAO_InputCDR& cdr);
00068
00069 virtual int check_prefix (const char *endpoint);
00070
00071 virtual char object_key_delimiter (void) const;
00072
00073 public:
00074
00075
00076
00077 typedef TAO_Connect_Concurrency_Strategy<TAO_IIOP_Connection_Handler>
00078 TAO_IIOP_CONNECT_CONCURRENCY_STRATEGY;
00079
00080 typedef TAO_Connect_Creation_Strategy<TAO_IIOP_Connection_Handler>
00081 TAO_IIOP_CONNECT_CREATION_STRATEGY;
00082
00083 typedef ACE_Connect_Strategy<TAO_IIOP_Connection_Handler,
00084 ACE_SOCK_CONNECTOR>
00085 TAO_IIOP_CONNECT_STRATEGY ;
00086
00087 typedef ACE_Strategy_Connector<TAO_IIOP_Connection_Handler,
00088 ACE_SOCK_CONNECTOR>
00089 TAO_IIOP_BASE_CONNECTOR;
00090
00091
00092 protected:
00093
00094
00095
00096
00097 virtual int supports_parallel_connects (void) const;
00098
00099
00100
00101 int set_validate_endpoint (TAO_Endpoint *ep);
00102
00103 virtual TAO_Transport *make_connection (
00104 TAO::Profile_Transport_Resolver *r,
00105 TAO_Transport_Descriptor_Interface &desc,
00106 ACE_Time_Value *timeout = 0);
00107
00108 virtual TAO_Transport *make_parallel_connection (
00109 TAO::Profile_Transport_Resolver *r,
00110 TAO_Transport_Descriptor_Interface &desc,
00111 ACE_Time_Value *timeout = 0);
00112
00113
00114
00115 virtual TAO_Profile *make_profile (void);
00116
00117
00118 virtual int cancel_svc_handler (TAO_Connection_Handler * svc_handler);
00119
00120
00121
00122
00123
00124
00125
00126 private:
00127
00128
00129 int begin_connection (TAO_IIOP_Connection_Handler *&svc_handler,
00130 TAO::Profile_Transport_Resolver *r,
00131 TAO_IIOP_Endpoint *endpoint,
00132 ACE_Time_Value *timeout = 0);
00133
00134
00135
00136
00137
00138 TAO_Transport *complete_connection (int result,
00139 TAO_Transport_Descriptor_Interface &desc,
00140 TAO_IIOP_Connection_Handler **&sh_list,
00141 TAO_IIOP_Endpoint **ep_list,
00142 unsigned count,
00143 TAO::Profile_Transport_Resolver *r,
00144 TAO_LF_Multi_Event *mev,
00145 ACE_Time_Value *timeout = 0);
00146
00147
00148
00149
00150 TAO_IIOP_Endpoint *remote_endpoint (TAO_Endpoint *ep);
00151
00152 private:
00153
00154
00155 TAO_IIOP_CONNECT_STRATEGY connect_strategy_;
00156
00157
00158 TAO_IIOP_BASE_CONNECTOR base_connector_;
00159
00160
00161
00162 };
00163
00164 TAO_END_VERSIONED_NAMESPACE_DECL
00165
00166 #endif
00167
00168 #include "ace/post.h"
00169 #endif