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_SCIOP_ACCEPTOR_H
00017 #define TAO_SCIOP_ACCEPTOR_H
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 TAO_HAS_SCIOP == 1
00027
00028 #include "tao/Transport_Acceptor.h"
00029 #include "tao/Strategies/SCIOP_Connection_Handler.h"
00030 #include "tao/Acceptor_Impl.h"
00031 #include "tao/GIOP_Message_Version.h"
00032
00033 #include "ace/SOCK_SEQPACK_Acceptor.h"
00034 #include "ace/Acceptor.h"
00035
00036 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047 class TAO_Strategies_Export TAO_SCIOP_Acceptor : public TAO_Acceptor
00048 {
00049 public:
00050
00051 TAO_SCIOP_Acceptor (void);
00052
00053
00054 ~TAO_SCIOP_Acceptor (void);
00055
00056
00057
00058 const ACE_INET_Addr& address (void) const;
00059
00060
00061 const ACE_INET_Addr *endpoints (void);
00062
00063 typedef TAO_Strategy_Acceptor<TAO_SCIOP_Connection_Handler, ACE_SOCK_SEQPACK_ACCEPTOR> TAO_SCIOP_BASE_ACCEPTOR;
00064 typedef TAO_Creation_Strategy<TAO_SCIOP_Connection_Handler> TAO_SCIOP_CREATION_STRATEGY;
00065 typedef TAO_Concurrency_Strategy<TAO_SCIOP_Connection_Handler> TAO_SCIOP_CONCURRENCY_STRATEGY;
00066 typedef TAO_Accept_Strategy<TAO_SCIOP_Connection_Handler, ACE_SOCK_SEQPACK_ACCEPTOR> TAO_SCIOP_ACCEPT_STRATEGY;
00067
00068
00069
00070
00071
00072 virtual int open (TAO_ORB_Core *orb_core,
00073 ACE_Reactor *reactor,
00074 int version_major,
00075 int version_minor,
00076 const char *address,
00077 const char *options = 0);
00078 virtual int open_default (TAO_ORB_Core *orb_core,
00079 ACE_Reactor *reactor,
00080 int version_major,
00081 int version_minor,
00082 const char *options = 0);
00083 virtual int close (void);
00084 virtual int create_profile (const TAO::ObjectKey &object_key,
00085 TAO_MProfile &mprofile,
00086 CORBA::Short priority);
00087 virtual int is_collocated (const TAO_Endpoint *endpoint);
00088 virtual CORBA::ULong endpoint_count (void);
00089
00090 virtual int object_key (IOP::TaggedProfile &profile,
00091 TAO::ObjectKey &key);
00092
00093
00094
00095
00096
00097
00098
00099
00100 int hostname (TAO_ORB_Core *orb_core,
00101 ACE_INET_Addr &addr,
00102 char *&host,
00103 const char *specified_hostname = 0);
00104
00105
00106
00107
00108
00109 int dotted_decimal_address (ACE_INET_Addr &addr,
00110 char *&host);
00111
00112 protected:
00113
00114
00115
00116
00117
00118
00119 virtual int open_i (const ACE_Multihomed_INET_Addr &addr,
00120 ACE_Reactor *reactor);
00121
00122
00123
00124
00125
00126
00127
00128
00129 int probe_interfaces (TAO_ORB_Core *orb_core);
00130
00131
00132
00133
00134
00135 int parse_multiple_hostnames (const char *hostnames,
00136 ACE_Array<ACE_CString> &hostnames_out);
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148 virtual int parse_options (const char *options);
00149
00150
00151
00152 int init_tcp_properties (void);
00153
00154
00155
00156 int create_new_profile (const TAO::ObjectKey &object_key,
00157 TAO_MProfile &mprofile,
00158 CORBA::Short priority);
00159
00160
00161
00162 int create_shared_profile (const TAO::ObjectKey &object_key,
00163 TAO_MProfile &mprofile,
00164 CORBA::Short priority);
00165
00166 protected:
00167
00168
00169
00170 ACE_INET_Addr *addrs_;
00171
00172
00173
00174
00175
00176
00177 u_short port_span_;
00178
00179
00180
00181
00182
00183
00184
00185
00186 char **hosts_;
00187
00188
00189
00190 CORBA::ULong endpoint_count_;
00191
00192
00193
00194
00195 char *hostname_in_ior_;
00196
00197
00198
00199
00200
00201
00202 TAO_GIOP_Message_Version version_;
00203
00204
00205 TAO_ORB_Core *orb_core_;
00206
00207 private:
00208
00209
00210 TAO_SCIOP_BASE_ACCEPTOR base_acceptor_;
00211
00212
00213 TAO_SCIOP_CREATION_STRATEGY *creation_strategy_;
00214 TAO_SCIOP_CONCURRENCY_STRATEGY *concurrency_strategy_;
00215 TAO_SCIOP_ACCEPT_STRATEGY *accept_strategy_;
00216
00217 };
00218
00219 TAO_END_VERSIONED_NAMESPACE_DECL
00220
00221 #if defined(__ACE_INLINE__)
00222 #include "tao/Strategies/SCIOP_Acceptor.inl"
00223 #endif
00224
00225 #endif
00226
00227 #include "ace/post.h"
00228 #endif