00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef TAO_SHMIOP_ACCEPTOR_H
00016 #define TAO_SHMIOP_ACCEPTOR_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_SHMIOP) && (TAO_HAS_SHMIOP != 0)
00027
00028 #include "tao/Transport_Acceptor.h"
00029 #include "tao/Strategies/SHMIOP_Connection_Handler.h"
00030 #include "tao/Acceptor_Impl.h"
00031 #include "ace/Acceptor.h"
00032 #include "ace/MEM_Acceptor.h"
00033 #include "tao/GIOP_Message_Version.h"
00034
00035
00036 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00037
00038
00039
00040
00041
00042
00043
00044 class TAO_Strategies_Export TAO_SHMIOP_Acceptor : public TAO_Acceptor
00045 {
00046 public:
00047
00048 TAO_SHMIOP_Acceptor (CORBA::Boolean flag = false);
00049
00050
00051 ~TAO_SHMIOP_Acceptor (void);
00052
00053 typedef ACE_Strategy_Acceptor<TAO_SHMIOP_Connection_Handler, ACE_MEM_ACCEPTOR> TAO_SHMIOP_BASE_ACCEPTOR;
00054 typedef TAO_Creation_Strategy<TAO_SHMIOP_Connection_Handler> TAO_SHMIOP_CREATION_STRATEGY;
00055 typedef TAO_Concurrency_Strategy<TAO_SHMIOP_Connection_Handler> TAO_SHMIOP_CONCURRENCY_STRATEGY;
00056 typedef TAO_Accept_Strategy<TAO_SHMIOP_Connection_Handler, ACE_MEM_ACCEPTOR> TAO_SHMIOP_ACCEPT_STRATEGY;
00057
00058
00059
00060
00061
00062
00063
00064 virtual int open (TAO_ORB_Core *orb_core,
00065 ACE_Reactor *reactor,
00066 int version_major,
00067 int version_minor,
00068 const char *port,
00069 const char *options = 0);
00070 virtual int open_default (TAO_ORB_Core *orb_core,
00071 ACE_Reactor *reactor,
00072 int version_major,
00073 int version_minor,
00074 const char *options = 0);
00075 virtual int close (void);
00076 virtual int create_profile (const TAO::ObjectKey &object_key,
00077 TAO_MProfile &mprofile,
00078 CORBA::Short priority);
00079
00080 virtual int is_collocated (const TAO_Endpoint* endpoint);
00081 virtual CORBA::ULong endpoint_count (void);
00082
00083 virtual int object_key (IOP::TaggedProfile &profile,
00084 TAO::ObjectKey &key);
00085
00086
00087
00088
00089 int set_mmap_options (const ACE_TCHAR *prefix,
00090 off_t size);
00091
00092 private:
00093
00094 int open_i (TAO_ORB_Core* orb_core,
00095 ACE_Reactor *reactor);
00096
00097
00098 virtual int parse_options (const char *options);
00099
00100
00101 int create_new_profile (const TAO::ObjectKey &object_key,
00102 TAO_MProfile &mprofile,
00103 CORBA::Short priority);
00104
00105
00106 int create_shared_profile (const TAO::ObjectKey &object_key,
00107 TAO_MProfile &mprofile,
00108 CORBA::Short priority);
00109
00110 protected:
00111
00112
00113
00114
00115
00116
00117 ACE_CString host_;
00118
00119
00120 ACE_MEM_Addr address_;
00121
00122
00123 TAO_GIOP_Message_Version version_;
00124
00125
00126 TAO_ORB_Core *orb_core_;
00127
00128 private:
00129
00130 TAO_SHMIOP_BASE_ACCEPTOR base_acceptor_;
00131
00132
00133 TAO_SHMIOP_CREATION_STRATEGY *creation_strategy_;
00134 TAO_SHMIOP_CONCURRENCY_STRATEGY *concurrency_strategy_;
00135 TAO_SHMIOP_ACCEPT_STRATEGY *accept_strategy_;
00136
00137
00138 const ACE_TCHAR *mmap_file_prefix_;
00139
00140
00141
00142 off_t mmap_size_;
00143
00144
00145 CORBA::Boolean lite_flag_;
00146 };
00147
00148 TAO_END_VERSIONED_NAMESPACE_DECL
00149
00150 #endif
00151
00152 #include "ace/post.h"
00153
00154 #endif