#include <SHMIOP_Factory.h>
Inheritance diagram for TAO_SHMIOP_Protocol_Factory:


Public Member Functions | |
| TAO_SHMIOP_Protocol_Factory (void) | |
| Constructor. | |
| virtual | ~TAO_SHMIOP_Protocol_Factory (void) |
| Destructor. | |
| virtual int | init (int argc, ACE_TCHAR *argv[]) |
| Dynamic linking hook. | |
| virtual int | match_prefix (const ACE_CString &prefix) |
| Verify prefix is a match. | |
| virtual const char * | prefix (void) const |
| Returns the prefix used by the protocol. | |
| virtual char | options_delimiter (void) const |
| void | mmap_file_prefix (const ACE_TCHAR *prefix) |
| Set mmap file prefix. | |
| const ACE_TCHAR * | mmap_file_prefix (void) |
| Get mmap file prefix. | |
Protocol factory methods | |
| virtual TAO_Acceptor * | make_acceptor (void) |
| virtual TAO_Connector * | make_connector (void) |
| virtual int | requires_explicit_endpoint (void) const |
Private Attributes | |
| int | major_ |
| int | minor_ |
| ACE_TCHAR * | mmap_prefix_ |
| Specify the prefix (full path) for mmap files. | |
| off_t | min_bytes_ |
| Minimum bytes of the mmap files. | |
|
|
Constructor.
Definition at line 24 of file SHMIOP_Factory.cpp. References TAO_DEF_GIOP_MAJOR, TAO_DEF_GIOP_MINOR, and TAO_TAG_SHMEM_PROFILE.
00025 : TAO_Protocol_Factory (TAO_TAG_SHMEM_PROFILE), 00026 major_ (TAO_DEF_GIOP_MAJOR), 00027 minor_ (TAO_DEF_GIOP_MINOR), 00028 mmap_prefix_ (0), 00029 min_bytes_ (10*1024) // @@ Nanbor, remove this magic number!! 00030 { 00031 } |
|
|
Destructor.
Definition at line 33 of file SHMIOP_Factory.cpp.
00034 {
00035 delete [] this->mmap_prefix_;
00036 }
|
|
||||||||||||
|
Dynamic linking hook.
Reimplemented from TAO_Protocol_Factory. Definition at line 73 of file SHMIOP_Factory.cpp. References ACE_Arg_Shifter, ACE_TCHAR, ACE_TEXT, ACE_OS::atoi(), ACE_Argv_Type_Converter::get_argc(), ACE_Argv_Type_Converter::get_TCHAR_argv(), min_bytes_, and ACE::strnew().
00075 {
00076 // Copy command line parameter not to use original as well as type conversion.
00077 ACE_Argv_Type_Converter command_line(argc, argv);
00078
00079 ACE_Arg_Shifter arg_shifter (command_line.get_argc(), command_line.get_TCHAR_argv());
00080
00081 while (arg_shifter.is_anything_left ())
00082 {
00083 const ACE_TCHAR *current_arg = 0;
00084
00085 if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-MMAPFileSize"))))
00086 {
00087 this->min_bytes_ = ACE_OS::atoi (current_arg);
00088 arg_shifter.consume_arg ();
00089 }
00090 else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-MMAPFilePrefix"))))
00091 {
00092 this->mmap_prefix_ = ACE::strnew (current_arg);
00093 arg_shifter.consume_arg ();
00094 }
00095 else
00096 // Any arguments that don't match are ignored so that the
00097 // caller can still use them.
00098 arg_shifter.ignore_arg ();
00099 }
00100
00101 return 0;
00102 }
|
|
|
Reimplemented from TAO_Protocol_Factory. Definition at line 58 of file SHMIOP_Factory.cpp. References ACE_NEW_RETURN, and TAO_SHMIOP_Acceptor::set_mmap_options().
00059 {
00060 TAO_SHMIOP_Acceptor *acceptor = 0;
00061
00062 ACE_NEW_RETURN (acceptor,
00063 TAO_SHMIOP_Acceptor,
00064 0);
00065
00066 acceptor->set_mmap_options (this->mmap_prefix_,
00067 this->min_bytes_);
00068
00069 return acceptor;
00070 }
|
|
|
Reimplemented from TAO_Protocol_Factory. Definition at line 105 of file SHMIOP_Factory.cpp. References ACE_NEW_RETURN.
00106 {
00107 TAO_Connector *connector = 0;
00108
00109 ACE_NEW_RETURN (connector,
00110 TAO_SHMIOP_Connector,
00111 0);
00112 return connector;
00113 }
|
|
|
Verify prefix is a match.
Reimplemented from TAO_Protocol_Factory. Definition at line 39 of file SHMIOP_Factory.cpp. References ACE_OS::strcasecmp().
00040 {
00041 // Check for the proper prefix for this protocol.
00042 return (ACE_OS::strcasecmp (prefix.c_str (), ::prefix_) == 0);
00043 }
|
|
|
Get mmap file prefix.
|
|
|
Set mmap file prefix.
|
|
|
Return the character used to mark where an endpoint ends and where its options begin. Reimplemented from TAO_Protocol_Factory. Definition at line 52 of file SHMIOP_Factory.cpp.
00053 {
00054 return '/';
00055 }
|
|
|
Returns the prefix used by the protocol.
Reimplemented from TAO_Protocol_Factory. Definition at line 46 of file SHMIOP_Factory.cpp.
00047 {
00048 return ::prefix_;
00049 }
|
|
|
Implements TAO_Protocol_Factory. Definition at line 116 of file SHMIOP_Factory.cpp.
00117 {
00118 return 1;
00119 }
|
|
|
Definition at line 78 of file SHMIOP_Factory.h. |
|
|
Minimum bytes of the mmap files.
Definition at line 87 of file SHMIOP_Factory.h. Referenced by init(). |
|
|
Definition at line 79 of file SHMIOP_Factory.h. |
|
|
Specify the prefix (full path) for mmap files.
Definition at line 84 of file SHMIOP_Factory.h. |
1.3.6