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