Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef TAO_IIOP_ENDPOINT_H
00016 #define TAO_IIOP_ENDPOINT_H
00017
00018 #include "ace/pre.h"
00019
00020 #include "tao/orbconf.h"
00021
00022 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00023 # pragma once
00024 #endif
00025
00026 #if defined (TAO_HAS_IIOP) && (TAO_HAS_IIOP != 0)
00027
00028 #include "tao/CORBA_String.h"
00029 #include "tao/IIOP_EndpointsC.h"
00030 #include "tao/Endpoint.h"
00031
00032 #include "ace/INET_Addr.h"
00033
00034 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00035
00036 class TAO_IIOP_Connection_Handler;
00037 class TAO_IIOP_Profile;
00038
00039
00040
00041
00042
00043
00044
00045
00046 class TAO_Export TAO_IIOP_Endpoint : public TAO_Endpoint
00047 {
00048 public:
00049
00050
00051
00052
00053 friend class TAO_IIOP_Profile;
00054 friend class TAO_SSLIOP_Profile;
00055
00056
00057
00058
00059 TAO_IIOP_Endpoint (void);
00060
00061
00062
00063 TAO_IIOP_Endpoint (const char *host,
00064 CORBA::UShort port,
00065 const ACE_INET_Addr &addr,
00066 CORBA::Short priority = TAO_INVALID_PRIORITY);
00067
00068
00069 TAO_IIOP_Endpoint (const ACE_INET_Addr &addr,
00070 int use_dotted_decimal_addresses);
00071
00072
00073 TAO_IIOP_Endpoint (const char *host,
00074 CORBA::UShort port,
00075 CORBA::Short priority);
00076
00077
00078
00079
00080
00081 ~TAO_IIOP_Endpoint (void);
00082
00083
00084
00085
00086
00087 virtual TAO_Endpoint *next (void);
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104 virtual TAO_Endpoint *next_filtered (TAO_ORB_Core *, TAO_Endpoint *root);
00105
00106 virtual int addr_to_string (char *buffer, size_t length);
00107
00108
00109 virtual TAO_Endpoint *duplicate (void);
00110
00111
00112
00113 virtual CORBA::Boolean is_equivalent (const TAO_Endpoint *other_endpoint);
00114
00115
00116 virtual CORBA::ULong hash (void);
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127 const ACE_INET_Addr &object_addr (void) const;
00128
00129
00130
00131 const char *host (void) const;
00132
00133
00134
00135 const char *host (const char *h);
00136
00137
00138 CORBA::UShort port (void) const;
00139
00140
00141 CORBA::UShort port (CORBA::UShort p);
00142
00143
00144 bool is_preferred_network (void) const;
00145
00146
00147 const char *preferred_network (void) const;
00148
00149 #if defined (ACE_HAS_IPV6)
00150
00151 bool is_ipv6_decimal (void) const;
00152 #endif
00153
00154
00155
00156
00157
00158
00159 TAO_IIOP_Endpoint & operator= (const TAO_IIOP_Endpoint& other);
00160
00161 private:
00162 TAO_IIOP_Endpoint *next_filtered_i (TAO_IIOP_Endpoint *root,
00163 bool ipv6_only,
00164 bool prefer_ipv6,
00165 bool want_ipv6);
00166
00167
00168
00169
00170
00171 int set (const ACE_INET_Addr &addr,
00172 int use_dotted_decimal_addresses);
00173
00174
00175 void object_addr_i (void) const;
00176
00177
00178
00179 CORBA::ULong preferred_interfaces (const char *csvPreferred,
00180 bool enforce,
00181 TAO_IIOP_Profile &profile);
00182
00183
00184
00185 TAO_IIOP_Endpoint *add_local_endpoint (TAO_IIOP_Endpoint *ep,
00186 const char *local,
00187 TAO_IIOP_Profile &profile);
00188
00189
00190
00191
00192
00193
00194
00195 TAO_IIOP_Endpoint (const TAO_IIOP_Endpoint &);
00196
00197 private:
00198
00199
00200 CORBA::String_var host_;
00201
00202
00203 CORBA::UShort port_;
00204
00205 #if defined (ACE_HAS_IPV6)
00206
00207 bool is_ipv6_decimal_;
00208 #endif
00209
00210
00211 bool is_encodable_;
00212
00213
00214 mutable bool object_addr_set_;
00215
00216
00217
00218 mutable ACE_INET_Addr object_addr_;
00219
00220
00221 TAO::IIOP_Endpoint_Info preferred_path_;
00222
00223
00224
00225 TAO_IIOP_Endpoint *next_;
00226
00227
00228 };
00229
00230 TAO_END_VERSIONED_NAMESPACE_DECL
00231
00232 #if defined (__ACE_INLINE__)
00233 # include "tao/IIOP_Endpoint.inl"
00234 #endif
00235
00236 #endif
00237
00238 #include "ace/post.h"
00239 #endif