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 (CORBA::Boolean flag = false);
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
00064
00065
00066
00067
00068 virtual int open (TAO_ORB_Core *orb_core,
00069 ACE_Reactor *reactor,
00070 int version_major,
00071 int version_minor,
00072 const char *address,
00073 const char *options = 0);
00074 virtual int open_default (TAO_ORB_Core *orb_core,
00075 ACE_Reactor *reactor,
00076 int version_major,
00077 int version_minor,
00078 const char *options = 0);
00079 virtual int close (void);
00080 virtual int create_profile (const TAO::ObjectKey &object_key,
00081 TAO_MProfile &mprofile,
00082 CORBA::Short priority);
00083
00084 virtual int is_collocated (const TAO_Endpoint *endpoint);
00085 virtual CORBA::ULong endpoint_count (void);
00086
00087 virtual int object_key (IOP::TaggedProfile &profile,
00088 TAO::ObjectKey &key);
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098 int hostname (TAO_ORB_Core *orb_core,
00099 ACE_INET_Addr &addr,
00100 char *&host,
00101 const char *specified_hostname = 0);
00102
00103
00104
00105
00106
00107 int dotted_decimal_address (ACE_INET_Addr &addr,
00108 char *&host);
00109
00110 protected:
00111
00112
00113
00114
00115
00116
00117 virtual int open_i (const ACE_INET_Addr &addr,
00118 ACE_Reactor *reactor);
00119
00120
00121
00122
00123
00124
00125
00126
00127 int probe_interfaces (TAO_ORB_Core *orb_core);
00128
00129
00130 virtual int parse_options (const char *options);
00131
00132
00133
00134 int create_new_profile (const TAO::ObjectKey &object_key,
00135 TAO_MProfile &mprofile,
00136 CORBA::Short priority);
00137
00138
00139
00140 int create_shared_profile (const TAO::ObjectKey &object_key,
00141 TAO_MProfile &mprofile,
00142 CORBA::Short priority);
00143 protected:
00144
00145
00146
00147 ACE_INET_Addr *addrs_;
00148
00149
00150
00151
00152
00153
00154
00155
00156 char **hosts_;
00157
00158
00159
00160 CORBA::ULong endpoint_count_;
00161
00162
00163
00164
00165
00166
00167 TAO_GIOP_Message_Version version_;
00168
00169
00170 TAO_ORB_Core *orb_core_;
00171
00172
00173 CORBA::Boolean lite_flag_;
00174
00175 private:
00176
00177 TAO_DIOP_Connection_Handler *connection_handler_;
00178
00179 };
00180
00181 TAO_END_VERSIONED_NAMESPACE_DECL
00182
00183 #if defined(__ACE_INLINE__)
00184 #include "tao/Strategies/DIOP_Acceptor.i"
00185 #endif
00186
00187 #endif
00188
00189 #include "ace/post.h"
00190
00191 #endif