#include <DIOP_Connector.h>
Inheritance diagram for TAO_DIOP_Connector:
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 DIOP_Connector.h.
|
Definition at line 115 of file DIOP_Connector.h. Referenced by close(). |
|
Constructor.
Definition at line 28 of file DIOP_Connector.cpp. References TAO_TAG_DIOP_PROFILE.
00029 : TAO_Connector (TAO_TAG_DIOP_PROFILE), 00030 lite_flag_ (flag) 00031 { 00032 } |
|
Destructor.
Definition at line 34 of file DIOP_Connector.cpp.
00035 { 00036 } |
|
Cancel the passed cvs handler from the connector.
Implements TAO_Connector. Definition at line 234 of file DIOP_Connector.cpp.
00236 {
00237 return 0;
00238 }
|
|
Implements TAO_Connector. Definition at line 188 of file DIOP_Connector.cpp. References ACE_OS::strchr(), ACE_OS::strlen(), and ACE_OS::strncasecmp().
00189 { 00190 // Check for a valid string 00191 if (!endpoint || !*endpoint) 00192 return -1; // Failure 00193 00194 const char *protocol[] = { "diop", "dioploc" }; 00195 00196 size_t const slot = ACE_OS::strchr (endpoint, ':') - endpoint; 00197 00198 size_t const len0 = ACE_OS::strlen (protocol[0]); 00199 size_t const len1 = ACE_OS::strlen (protocol[1]); 00200 00201 // Check for the proper prefix in the IOR. If the proper prefix 00202 // isn't in the IOR then it is not an IOR we can use. 00203 if (slot == len0 00204 && ACE_OS::strncasecmp (endpoint, protocol[0], len0) == 0) 00205 return 0; 00206 else if (slot == len1 00207 && ACE_OS::strncasecmp (endpoint, protocol[1], len1) == 0) 00208 return 0; 00209 00210 return -1; 00211 // Failure: not an DIOP IOR 00212 // DO NOT throw an exception here. 00213 } |
|
Implements TAO_Connector. Definition at line 53 of file DIOP_Connector.cpp. References ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::done(), svc_handler_table_, and SvcHandlerIterator.
00054 { 00055 // The list of service handlers cleans itself?? 00056 SvcHandlerIterator iter (svc_handler_table_); 00057 00058 while (!iter.done ()) 00059 { 00060 (*iter).int_id_->remove_reference (); 00061 iter++; 00062 } 00063 00064 // @@ Michael: We do not use regular connection management. 00065 return 0; 00066 } |
|
Implements TAO_Connector. Definition at line 149 of file DIOP_Connector.cpp. References TAO_Profile::_decr_refcnt(), ACE_NEW_RETURN, and TAO_Profile::decode().
00150 { 00151 TAO_Profile *pfile = 0; 00152 ACE_NEW_RETURN (pfile, 00153 TAO_DIOP_Profile (this->orb_core ()), 00154 0); 00155 00156 int const r = pfile->decode (cdr); 00157 if (r == -1) 00158 { 00159 pfile->_decr_refcnt (); 00160 pfile = 0; 00161 } 00162 00163 return pfile; 00164 } |
|
|
Implements TAO_Connector. Definition at line 167 of file DIOP_Connector.cpp. References ACE_CHECK_RETURN, and ACE_NEW_THROW_EX.
00168 { 00169 // The endpoint should be of the form: 00170 // N.n@host:port/object_key 00171 // or: 00172 // host:port/object_key 00173 00174 TAO_Profile *profile = 0; 00175 ACE_NEW_THROW_EX (profile, 00176 TAO_DIOP_Profile (this->orb_core ()), 00177 CORBA::NO_MEMORY ( 00178 CORBA::SystemException::_tao_minor_code ( 00179 TAO::VMCID, 00180 ENOMEM), 00181 CORBA::COMPLETED_NO)); 00182 ACE_CHECK_RETURN (0); 00183 00184 return profile; 00185 } |
|
Implements TAO_Connector. Definition at line 216 of file DIOP_Connector.cpp.
00217 { 00218 return TAO_DIOP_Profile::object_key_delimiter_; 00219 } |
|
Implements TAO_Connector. Definition at line 39 of file DIOP_Connector.cpp. References TAO_Connector::create_connect_strategy(), and TAO_Connector::orb_core().
00040 { 00041 this->orb_core (orb_core); 00042 00043 // Create our connect strategy 00044 if (this->create_connect_strategy () == -1) 00045 return -1; 00046 00047 // @@ Michael: We do not use regular connection management. 00048 00049 return 0; 00050 } |
|
Return the remote endpoint, a helper function.
Definition at line 222 of file DIOP_Connector.cpp. References TAO_Endpoint::tag(), and TAO_TAG_DIOP_PROFILE. Referenced by make_connection(), and set_validate_endpoint().
00223 { 00224 if (endpoint->tag () != TAO_TAG_DIOP_PROFILE) 00225 return 0; 00226 00227 TAO_DIOP_Endpoint *diop_endpoint = 00228 dynamic_cast<TAO_DIOP_Endpoint *> (endpoint ); 00229 00230 return diop_endpoint; 00231 } |
|
Implements TAO_Connector. Definition at line 69 of file DIOP_Connector.cpp. References ACE_DEBUG, ACE_TEXT, ACE_Addr::get_type(), LM_DEBUG, TAO_DIOP_Endpoint::object_addr(), remote_endpoint(), and TAO_debug_level.
00070 { 00071 TAO_DIOP_Endpoint *diop_endpoint = 00072 this->remote_endpoint (endpoint); 00073 00074 if (diop_endpoint == 0) 00075 return -1; 00076 00077 const ACE_INET_Addr &remote_address = 00078 diop_endpoint->object_addr (); 00079 00080 // Verify that the remote ACE_INET_Addr was initialized properly. 00081 // Failure can occur if hostname lookup failed when initializing the 00082 // remote ACE_INET_Addr. 00083 if (remote_address.get_type () != AF_INET) 00084 { 00085 if (TAO_debug_level > 0) 00086 { 00087 ACE_DEBUG ((LM_DEBUG, 00088 ACE_TEXT ("TAO (%P|%t) DIOP connection failed.\n") 00089 ACE_TEXT ("TAO (%P|%t) This is most likely ") 00090 ACE_TEXT ("due to a hostname lookup ") 00091 ACE_TEXT ("failure.\n"))); 00092 } 00093 00094 return -1; 00095 } 00096 00097 return 0; 00098 } |
|
Do we need to use a GIOP_Lite for sending messages?
Definition at line 96 of file DIOP_Connector.h. |
|
Definition at line 109 of file DIOP_Connector.h. Referenced by close(), and make_connection(). |