Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef TAO_DIOP_ACCEPTOR_H
00017 #define TAO_DIOP_ACCEPTOR_H
00018
00019 #include "ace/pre.h"
00020
00021 #include "tao/orbconf.h"
00022
00023 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00024 # pragma once
00025 #endif
00026
00027 #if defined (TAO_HAS_DIOP) && (TAO_HAS_DIOP != 0)
00028
00029 #include "tao/Transport_Acceptor.h"
00030 #include "tao/Strategies/DIOP_Connection_Handler.h"
00031 #include "tao/Acceptor_Impl.h"
00032
00033 #include "tao/GIOP_Message_Version.h"
00034
00035 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046 class TAO_Strategies_Export TAO_DIOP_Acceptor : public TAO_Acceptor
00047 {
00048 public:
00049
00050 TAO_DIOP_Acceptor (void);
00051
00052
00053 ~TAO_DIOP_Acceptor (void);
00054
00055
00056
00057 const ACE_INET_Addr& address (void) const;
00058
00059
00060 const ACE_INET_Addr *endpoints (void);
00061
00062
00063 const ACE_INET_Addr& default_address (void) const;
00064
00065
00066 void set_default_address (const ACE_INET_Addr& addr);
00067
00068
00069
00070
00071
00072
00073
00074 virtual int open (TAO_ORB_Core *orb_core,
00075 ACE_Reactor *reactor,
00076 int version_major,
00077 int version_minor,
00078 const char *address,
00079 const char *options = 0);
00080 virtual int open_default (TAO_ORB_Core *orb_core,
00081 ACE_Reactor *reactor,
00082 int version_major,
00083 int version_minor,
00084 const char *options = 0);
00085 virtual int close (void);
00086 virtual int create_profile (const TAO::ObjectKey &object_key,
00087 TAO_MProfile &mprofile,
00088 CORBA::Short priority);
00089
00090 virtual int is_collocated (const TAO_Endpoint *endpoint);
00091 virtual CORBA::ULong endpoint_count (void);
00092
00093 virtual int object_key (IOP::TaggedProfile &profile,
00094 TAO::ObjectKey &key);
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104 virtual int hostname (TAO_ORB_Core *orb_core,
00105 ACE_INET_Addr &addr,
00106 char *&host,
00107 const char *specified_hostname = 0);
00108
00109
00110
00111
00112
00113 int dotted_decimal_address (ACE_INET_Addr &addr,
00114 char *&host);
00115
00116 protected:
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127 int parse_address (const char *address,
00128 ACE_INET_Addr &addr,
00129 ACE_CString &specified_hostname,
00130 int *def_type = 0);
00131
00132
00133
00134
00135
00136
00137 virtual int open_i (const ACE_INET_Addr &addr,
00138 ACE_Reactor *reactor);
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152 int probe_interfaces (TAO_ORB_Core *orb_core, int def_type = AF_UNSPEC);
00153
00154
00155 virtual int parse_options (const char *options);
00156
00157
00158
00159 int create_new_profile (const TAO::ObjectKey &object_key,
00160 TAO_MProfile &mprofile,
00161 CORBA::Short priority);
00162
00163
00164
00165 int create_shared_profile (const TAO::ObjectKey &object_key,
00166 TAO_MProfile &mprofile,
00167 CORBA::Short priority);
00168 protected:
00169
00170
00171
00172 ACE_INET_Addr *addrs_;
00173
00174
00175
00176
00177
00178
00179
00180
00181 char **hosts_;
00182
00183
00184
00185 CORBA::ULong endpoint_count_;
00186
00187
00188
00189
00190
00191
00192 TAO_GIOP_Message_Version version_;
00193
00194
00195 TAO_ORB_Core *orb_core_;
00196
00197
00198 ACE_INET_Addr default_address_;
00199
00200 private:
00201
00202 TAO_DIOP_Connection_Handler *connection_handler_;
00203
00204 };
00205
00206 TAO_END_VERSIONED_NAMESPACE_DECL
00207
00208 #if defined(__ACE_INLINE__)
00209 #include "tao/Strategies/DIOP_Acceptor.inl"
00210 #endif
00211
00212 #endif
00213
00214 #include "ace/post.h"
00215
00216 #endif