#include <COIOP_Connector.h>
Inheritance diagram for TAO_COIOP_Connector:
Public Member Functions | |
TAO_COIOP_Connector (void) | |
Constructor. | |
~TAO_COIOP_Connector (void) | |
Destructor. | |
The TAO_Connector Methods | |
int | open (TAO_ORB_Core *orb_core) |
int | close (void) |
TAO_Profile * | create_profile (TAO_InputCDR &cdr) |
virtual int | check_prefix (const char *endpoint) |
virtual char | object_key_delimiter (void) const |
Protected Member Functions | |
int | cancel_svc_handler (TAO_Connection_Handler *svc_handler) |
Cancel the passed cvs handler from the connector. | |
More TAO_Connector Methods | |
int | set_validate_endpoint (TAO_Endpoint *ep) |
TAO_Transport * | make_connection (TAO::Profile_Transport_Resolver *r, TAO_Transport_Descriptor_Interface &desc, ACE_Time_Value *timeout=0) |
virtual TAO_Profile * | make_profile (void) |
Private Member Functions | |
TAO_COIOP_Endpoint * | remote_endpoint (TAO_Endpoint *ep) |
Return the remote endpoint, a helper function. |
Concrete instance of the TAO_Connector class. Responsible for establishing a connection with a server and is called from the Connector_Registory.
Definition at line 47 of file COIOP_Connector.h.
|
Constructor.
Definition at line 25 of file COIOP_Connector.cpp. References TAO_TAG_COIOP_PROFILE.
00026 : TAO_Connector (TAO_TAG_COIOP_PROFILE) 00027 { 00028 } |
|
Destructor.
Definition at line 30 of file COIOP_Connector.cpp.
00031 { 00032 } |
|
Cancel the passed cvs handler from the connector.
Implements TAO_Connector. Definition at line 158 of file COIOP_Connector.cpp.
00160 {
00161 return 0;
00162 }
|
|
Implements TAO_Connector. Definition at line 112 of file COIOP_Connector.cpp. References ACE_OS::strchr(), ACE_OS::strlen(), and ACE_OS::strncasecmp().
00113 { 00114 // Check for a valid string 00115 if (!endpoint || !*endpoint) 00116 return -1; // Failure 00117 00118 const char *protocol[] = { "COIOP", "COIOPloc" }; 00119 00120 size_t const slot = ACE_OS::strchr (endpoint, ':') - endpoint; 00121 00122 size_t const len0 = ACE_OS::strlen (protocol[0]); 00123 size_t const len1 = ACE_OS::strlen (protocol[1]); 00124 00125 // Check for the proper prefix in the IOR. If the proper prefix 00126 // isn't in the IOR then it is not an IOR we can use. 00127 if (slot == len0 00128 && ACE_OS::strncasecmp (endpoint, protocol[0], len0) == 0) 00129 return 0; 00130 else if (slot == len1 00131 && ACE_OS::strncasecmp (endpoint, protocol[1], len1) == 0) 00132 return 0; 00133 00134 return -1; 00135 // Failure: not an COIOP IOR 00136 // DO NOT throw an exception here. 00137 } |
|
Implements TAO_Connector. Definition at line 47 of file COIOP_Connector.cpp.
00048 {
00049 return 0;
00050 }
|
|
Implements TAO_Connector. Definition at line 74 of file COIOP_Connector.cpp. References TAO_Profile::_decr_refcnt(), ACE_NEW_RETURN, and TAO_Profile::decode().
00075 { 00076 TAO_Profile *pfile = 0; 00077 ACE_NEW_RETURN (pfile, 00078 TAO_COIOP_Profile (this->orb_core ()), 00079 0); 00080 00081 int const r = pfile->decode (cdr); 00082 if (r == -1) 00083 { 00084 pfile->_decr_refcnt (); 00085 pfile = 0; 00086 } 00087 00088 return pfile; 00089 } |
|
Implements TAO_Connector. Definition at line 65 of file COIOP_Connector.cpp.
00068 { 00069 // No remote connection possible with COIOP 00070 return 0; 00071 } |
|
Implements TAO_Connector. Definition at line 92 of file COIOP_Connector.cpp. References ACE_NEW_THROW_EX.
00093 { 00094 // The endpoint should be of the form: 00095 // N.n@uuid/object_key 00096 // or: 00097 // uuid/object_key 00098 00099 TAO_Profile *profile = 0; 00100 ACE_NEW_THROW_EX (profile, 00101 TAO_COIOP_Profile (this->orb_core ()), 00102 CORBA::NO_MEMORY ( 00103 CORBA::SystemException::_tao_minor_code ( 00104 TAO::VMCID, 00105 ENOMEM), 00106 CORBA::COMPLETED_NO)); 00107 00108 return profile; 00109 } |
|
Implements TAO_Connector. Definition at line 140 of file COIOP_Connector.cpp.
00141 { 00142 return TAO_COIOP_Profile::object_key_delimiter_; 00143 } |
|
Implements TAO_Connector. Definition at line 35 of file COIOP_Connector.cpp. References TAO_Connector::create_connect_strategy(), and TAO_Connector::orb_core().
00036 { 00037 this->orb_core (orb_core); 00038 00039 // Create our connect strategy 00040 if (this->create_connect_strategy () == -1) 00041 return -1; 00042 00043 return 0; 00044 } |
|
Return the remote endpoint, a helper function.
Definition at line 146 of file COIOP_Connector.cpp. References TAO_Endpoint::tag(), and TAO_TAG_COIOP_PROFILE. Referenced by set_validate_endpoint().
00147 { 00148 if (endpoint->tag () != TAO_TAG_COIOP_PROFILE) 00149 return 0; 00150 00151 TAO_COIOP_Endpoint *COIOP_endpoint = 00152 dynamic_cast<TAO_COIOP_Endpoint *> (endpoint ); 00153 00154 return COIOP_endpoint; 00155 } |
|
Implements TAO_Connector. Definition at line 53 of file COIOP_Connector.cpp. References remote_endpoint().
00054 { 00055 TAO_COIOP_Endpoint *COIOP_endpoint = 00056 this->remote_endpoint (endpoint); 00057 00058 if (COIOP_endpoint == 0) 00059 return -1; 00060 00061 return 0; 00062 } |