Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef TAO_UIOP_ACCEPTOR_H
00018 #define TAO_UIOP_ACCEPTOR_H
00019
00020 #include "ace/pre.h"
00021 #include "tao/orbconf.h"
00022
00023 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00024 # pragma once
00025 #endif
00026
00027 # if TAO_HAS_UIOP == 1
00028 #include "tao/Strategies/UIOP_Connection_Handler.h"
00029
00030 #include "tao/Transport_Acceptor.h"
00031 #include "tao/Acceptor_Impl.h"
00032 #include "tao/GIOP_Message_Version.h"
00033
00034 #include "ace/Acceptor.h"
00035 #include "ace/LSOCK_Acceptor.h"
00036
00037 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00038
00039
00040
00041
00042
00043
00044 class TAO_Strategies_Export TAO_UIOP_Acceptor : public TAO_Acceptor
00045 {
00046 public:
00047
00048
00049
00050
00051 TAO_UIOP_Acceptor (void);
00052
00053
00054 virtual ~TAO_UIOP_Acceptor (void);
00055
00056 typedef TAO_Strategy_Acceptor<TAO_UIOP_Connection_Handler, ACE_LSOCK_ACCEPTOR> TAO_UIOP_BASE_ACCEPTOR;
00057 typedef TAO_Creation_Strategy<TAO_UIOP_Connection_Handler> TAO_UIOP_CREATION_STRATEGY;
00058 typedef TAO_Concurrency_Strategy<TAO_UIOP_Connection_Handler> TAO_UIOP_CONCURRENCY_STRATEGY;
00059 typedef TAO_Accept_Strategy<TAO_UIOP_Connection_Handler, ACE_LSOCK_ACCEPTOR> TAO_UIOP_ACCEPT_STRATEGY;
00060
00061
00062
00063
00064
00065
00066
00067 virtual int open (TAO_ORB_Core *orb_core,
00068 ACE_Reactor *reactor,
00069 int version_major,
00070 int version_minor,
00071 const char *address,
00072 const char *options = 0);
00073 virtual int open_default (TAO_ORB_Core *orb_core,
00074 ACE_Reactor *reactor,
00075 int version_major,
00076 int version_minor,
00077 const char *options = 0);
00078 virtual int close (void);
00079 virtual int create_profile (const TAO::ObjectKey &object_key,
00080 TAO_MProfile &mprofile,
00081 CORBA::Short priority);
00082
00083 virtual int is_collocated (const TAO_Endpoint* endpoint);
00084 virtual CORBA::ULong endpoint_count (void);
00085
00086 virtual int object_key (IOP::TaggedProfile &profile,
00087 TAO::ObjectKey &key);
00088
00089
00090 private:
00091
00092 int open_i (const char *rendezvous,
00093 ACE_Reactor *reactor);
00094
00095
00096
00097 void rendezvous_point (ACE_UNIX_Addr &, const char *rendezvous);
00098
00099
00100 int parse_options (const char *options);
00101
00102
00103
00104 int init_uiop_properties (void);
00105
00106
00107 int create_new_profile (const TAO::ObjectKey &object_key,
00108 TAO_MProfile &mprofile,
00109 CORBA::Short priority);
00110
00111
00112 int create_shared_profile (const TAO::ObjectKey &object_key,
00113 TAO_MProfile &mprofile,
00114 CORBA::Short priority);
00115
00116 private:
00117
00118 TAO_UIOP_BASE_ACCEPTOR base_acceptor_;
00119
00120
00121 TAO_UIOP_CREATION_STRATEGY *creation_strategy_;
00122 TAO_UIOP_CONCURRENCY_STRATEGY *concurrency_strategy_;
00123 TAO_UIOP_ACCEPT_STRATEGY *accept_strategy_;
00124
00125
00126 TAO_GIOP_Message_Version version_;
00127
00128
00129 TAO_ORB_Core *orb_core_;
00130
00131
00132
00133
00134 bool unlink_on_close_;
00135 };
00136
00137 TAO_END_VERSIONED_NAMESPACE_DECL
00138
00139 # endif
00140
00141 #include "ace/post.h"
00142
00143 #endif