diff options
author | bala <balanatarajan@users.noreply.github.com> | 2002-04-17 17:25:37 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2002-04-17 17:25:37 +0000 |
commit | 8bb125a332a6b0bbcbd341d46113792e70fa60bf (patch) | |
tree | 47c8d82ba4558cfa43eb01d267ef68395bba5e58 /TAO/tao | |
parent | 0b04ad8569af741c169205ca8743f61ab3bf4f13 (diff) | |
download | ATCD-8bb125a332a6b0bbcbd341d46113792e70fa60bf.tar.gz |
ChangeLogTag: Wed Apr 17 12:25:31 2002 Balachandran Natarajan <bala@cs.wustl.edu>
Diffstat (limited to 'TAO/tao')
-rw-r--r-- | TAO/tao/GIOP_Message_Base.cpp | 18 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Base.h | 62 | ||||
-rw-r--r-- | TAO/tao/IIOP_Connector.cpp | 36 | ||||
-rw-r--r-- | TAO/tao/IIOP_Connector.h | 32 | ||||
-rw-r--r-- | TAO/tao/Strategies/DIOP_Connector.cpp | 28 | ||||
-rw-r--r-- | TAO/tao/Strategies/DIOP_Connector.h | 2 | ||||
-rw-r--r-- | TAO/tao/Strategies/SHMIOP_Connector.cpp | 62 | ||||
-rw-r--r-- | TAO/tao/Strategies/SHMIOP_Connector.h | 19 | ||||
-rw-r--r-- | TAO/tao/Strategies/UIOP_Connector.cpp | 49 | ||||
-rw-r--r-- | TAO/tao/Strategies/UIOP_Connector.h | 34 | ||||
-rw-r--r-- | TAO/tao/Transport_Connector.cpp | 3 | ||||
-rw-r--r-- | TAO/tao/Transport_Connector.h | 5 |
12 files changed, 214 insertions, 136 deletions
diff --git a/TAO/tao/GIOP_Message_Base.cpp b/TAO/tao/GIOP_Message_Base.cpp index b6cdc7fa5b1..ddfce68bbe0 100644 --- a/TAO/tao/GIOP_Message_Base.cpp +++ b/TAO/tao/GIOP_Message_Base.cpp @@ -905,7 +905,7 @@ TAO_GIOP_Message_Base::process_request (TAO_Transport *transport, if (response_required) { result = this->send_reply_exception (transport, - this->orb_core_, + output, request_id, &request.reply_service_info (), &ACE_ANY_EXCEPTION); @@ -963,7 +963,7 @@ TAO_GIOP_Message_Base::process_request (TAO_Transport *transport, CORBA::COMPLETED_MAYBE); result = this->send_reply_exception (transport, - this->orb_core_, + output, request_id, &request.reply_service_info (), &exception); @@ -1357,7 +1357,7 @@ TAO_GIOP_Message_Base:: int TAO_GIOP_Message_Base::send_reply_exception ( TAO_Transport *transport, - TAO_ORB_Core* orb_core, + TAO_OutputCDR &output, CORBA::ULong request_id, IOP::ServiceContextList *svc_info, CORBA::Exception *x @@ -1370,17 +1370,7 @@ TAO_GIOP_Message_Base::send_reply_exception ( '\0', sizeof repbuf); #endif /* ACE_HAS_PURIFY */ - TAO_OutputCDR output (repbuf, - sizeof repbuf, - TAO_ENCAP_BYTE_ORDER, - orb_core->output_cdr_buffer_allocator (), - orb_core->output_cdr_dblock_allocator (), - orb_core->output_cdr_msgblock_allocator (), - orb_core->orb_params ()->cdr_memcpy_tradeoff (), - TAO_DEF_GIOP_MAJOR, - TAO_DEF_GIOP_MINOR, - orb_core->to_iso8859 (), - orb_core->to_unicode ()); + TAO_Pluggable_Reply_Params_Base reply_params; reply_params.request_id_ = request_id; diff --git a/TAO/tao/GIOP_Message_Base.h b/TAO/tao/GIOP_Message_Base.h index cd5ffc5fe55..44b0feeefba 100644 --- a/TAO/tao/GIOP_Message_Base.h +++ b/TAO/tao/GIOP_Message_Base.h @@ -47,7 +47,7 @@ public: /// Constructor TAO_GIOP_Message_Base (TAO_ORB_Core *orb_core, - size_t input_cdr_size = ACE_CDR::DEFAULT_BUFSIZE); + size_t input_cdr_size = ACE_CDR::DEFAULT_BUFSIZE); /// Dtor virtual ~TAO_GIOP_Message_Base (void); @@ -55,7 +55,7 @@ public: /// Initialize the underlying state object based on the <major> and /// <minor> revision numbers virtual void init (CORBA::Octet major, - CORBA::Octet minor); + CORBA::Octet minor); /// Reset the messaging the object virtual void reset (void); @@ -63,8 +63,8 @@ public: /// Write the RequestHeader in to the <cdr> stream. The underlying /// implementation of the mesaging should do the right thing. virtual int generate_request_header (TAO_Operation_Details &op, - TAO_Target_Specification &spec, - TAO_OutputCDR &cdr); + TAO_Target_Specification &spec, + TAO_OutputCDR &cdr); /// Write the RequestHeader in to the <cdr> stream. virtual int generate_locate_request_header ( @@ -84,8 +84,8 @@ public: /// message is read and handled. Returns -1 on errors. If <block> is /// 1, then reply is read in a blocking manner. virtual int read_message (TAO_Transport *transport, - int block = 0, - ACE_Time_Value *max_wait_time = 0); + int block = 0, + ACE_Time_Value *max_wait_time = 0); /// Format the message. As we have not written the message length in @@ -105,23 +105,23 @@ public: * 0 if there are no more messages in <incoming>. */ virtual int extract_next_message (ACE_Message_Block &incoming, - TAO_Queued_Data *&qd); + TAO_Queued_Data *&qd); /// Check whether the node <qd> needs consolidation from <incoming> virtual int consolidate_node (TAO_Queued_Data *qd, - ACE_Message_Block &incoming); + ACE_Message_Block &incoming); /// Get the details of the message parsed through the <qd>. virtual void get_message_data (TAO_Queued_Data *qd); /// @@Bala:Docu?? virtual int consolidate_fragments (TAO_Queued_Data *dqd, - const TAO_Queued_Data *sqd); + const TAO_Queued_Data *sqd); /// Process the request message that we have received on the /// connection virtual int process_request_message (TAO_Transport *transport, - TAO_Queued_Data *qd); + TAO_Queued_Data *qd); /// Parse the reply message that we received and return the reply @@ -143,25 +143,25 @@ protected: /// Processes the <GIOP_REQUEST> messages int process_request (TAO_Transport *transport, - TAO_InputCDR &input, - TAO_OutputCDR &output, - TAO_GIOP_Message_Generator_Parser *); + TAO_InputCDR &input, + TAO_OutputCDR &output, + TAO_GIOP_Message_Generator_Parser *); /// Processes the <GIOP_LOCATE_REQUEST> messages int process_locate_request (TAO_Transport *transport, - TAO_InputCDR &input, - TAO_OutputCDR &output, - TAO_GIOP_Message_Generator_Parser *); + TAO_InputCDR &input, + TAO_OutputCDR &output, + TAO_GIOP_Message_Generator_Parser *); /// Set the state void set_state (CORBA::Octet major, - CORBA::Octet minor, - TAO_GIOP_Message_Generator_Parser *&); + CORBA::Octet minor, + TAO_GIOP_Message_Generator_Parser *&); /// Print out a debug messages.. void dump_msg (const char *label, - const u_char *ptr, - size_t len); + const u_char *ptr, + size_t len); /// Get the message type. The return value would be one of the /// following: @@ -177,33 +177,33 @@ private: /// NOTE: If the GIOP header happens to change in the future, we can /// push this method in to the generator_parser classes. int write_protocol_header (TAO_GIOP_Message_Type t, - TAO_OutputCDR &msg); + TAO_OutputCDR &msg); /// Make a <GIOP_LOCATEREPLY> and hand that over to the transport so /// that it can be sent over the connection. /// NOTE:As on date 1.1 & 1.2 seem to have similar headers. Till an /// unmanageable difference comes let them be implemented here. int make_send_locate_reply (TAO_Transport *transport, - TAO_GIOP_Locate_Request_Header &request, - TAO_GIOP_Locate_Status_Msg &status, - TAO_OutputCDR &output, - TAO_GIOP_Message_Generator_Parser *); + TAO_GIOP_Locate_Request_Header &request, + TAO_GIOP_Locate_Status_Msg &status, + TAO_OutputCDR &output, + TAO_GIOP_Message_Generator_Parser *); /// Send error messages int send_error (TAO_Transport *transport); /// Close a connection, first sending GIOP::CloseConnection. void send_close_connection (const TAO_GIOP_Message_Version &version, - TAO_Transport *transport, - void *ctx); + TAO_Transport *transport, + void *ctx); /// We must send a LocateReply through <transport>, this request /// resulted in some kind of exception. int send_reply_exception (TAO_Transport *transport, - TAO_ORB_Core* orb_core, - CORBA::ULong request_id, - IOP::ServiceContextList *svc_info, - CORBA::Exception *x); + TAO_OutputCDR &cdr, + CORBA::ULong request_id, + IOP::ServiceContextList *svc_info, + CORBA::Exception *x); /// Write the locate reply header diff --git a/TAO/tao/IIOP_Connector.cpp b/TAO/tao/IIOP_Connector.cpp index d4a40dd7424..8e7850b00e9 100644 --- a/TAO/tao/IIOP_Connector.cpp +++ b/TAO/tao/IIOP_Connector.cpp @@ -100,20 +100,16 @@ TAO_IIOP_Connector::close (void) } int -TAO_IIOP_Connector::make_connection (TAO_GIOP_Invocation *invocation, - TAO_Transport_Descriptor_Interface *desc) +TAO_IIOP_Connector::set_validate_endpoint (TAO_Endpoint *endpoint) { - ACE_Time_Value *max_wait_time = invocation->max_wait_time (); - TAO_Endpoint *endpoint = desc->endpoint (); - if (endpoint->tag () != TAO_TAG_IIOP_PROFILE) return -1; - TAO_IIOP_Endpoint *iiop_endpoint = - ACE_dynamic_cast (TAO_IIOP_Endpoint *, - endpoint ); - if (iiop_endpoint == 0) - return -1; + TAO_IIOP_Endpoint *iiop_endpoint = + ACE_dynamic_cast (TAO_IIOP_Endpoint *, + endpoint ); + if (iiop_endpoint == 0) + return -1; const ACE_INET_Addr &remote_address = iiop_endpoint->object_addr (); @@ -135,10 +131,28 @@ TAO_IIOP_Connector::make_connection (TAO_GIOP_Invocation *invocation, return -1; } + return 0; +} + +int +TAO_IIOP_Connector::make_connection (TAO_GIOP_Invocation *invocation, + TAO_Transport_Descriptor_Interface *desc) +{ + ACE_Time_Value *max_wait_time = invocation->max_wait_time (); + + TAO_IIOP_Endpoint *iiop_endpoint = + ACE_dynamic_cast (TAO_IIOP_Endpoint *, + desc->endpoint ()); + + if (iiop_endpoint == 0) + return -1; + + const ACE_INET_Addr &remote_address = + iiop_endpoint->object_addr (); + int result = 0; TAO_IIOP_Connection_Handler *svc_handler = 0; - if (TAO_debug_level > 2) ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("(%P|%t) IIOP_Connector::connect - ") diff --git a/TAO/tao/IIOP_Connector.h b/TAO/tao/IIOP_Connector.h index ffc5c8f119b..c02dc73bf60 100644 --- a/TAO/tao/IIOP_Connector.h +++ b/TAO/tao/IIOP_Connector.h @@ -62,20 +62,6 @@ public: virtual char object_key_delimiter (void) const; -protected: - // = The TAO_Connector methods, please check the documentation on - // Transport_Connector.h - int make_connection (TAO_GIOP_Invocation *invocation, - TAO_Transport_Descriptor_Interface *desc); - - /// More TAO_Connector methods, please check the documentation on - /// Transport_Connector.h - virtual TAO_Profile *make_profile (ACE_ENV_SINGLE_ARG_DECL); - - /// Obtain tcp properties that must be used by this connector, i.e., - /// initialize <tcp_properties_>. - int init_tcp_properties (void); - public: typedef TAO_Connect_Concurrency_Strategy<TAO_IIOP_Connection_Handler> @@ -93,6 +79,24 @@ public: TAO_IIOP_BASE_CONNECTOR; protected: + // = The TAO_Connector methods, please check the documentation on + // Transport_Connector.h + int set_validate_endpoint (TAO_Endpoint *ep); + + int make_connection (TAO_GIOP_Invocation *invocation, + TAO_Transport_Descriptor_Interface *desc); + + /// More TAO_Connector methods, please check the documentation on + /// Transport_Connector.h + virtual TAO_Profile *make_profile (ACE_ENV_SINGLE_ARG_DECL); + + /// Obtain tcp properties that must be used by this connector, i.e., + /// initialize <tcp_properties_>. + int init_tcp_properties (void); + + + +protected: /// TCP configuration properties to be used for all /// connections established by this connector. diff --git a/TAO/tao/Strategies/DIOP_Connector.cpp b/TAO/tao/Strategies/DIOP_Connector.cpp index 0bc75148a9a..6b7d2ed4927 100644 --- a/TAO/tao/Strategies/DIOP_Connector.cpp +++ b/TAO/tao/Strategies/DIOP_Connector.cpp @@ -93,19 +93,15 @@ TAO_DIOP_Connector::close (void) } int -TAO_DIOP_Connector::make_connection (TAO_GIOP_Invocation *invocation, - TAO_Transport_Descriptor_Interface *desc) +TAO_DIOP_Connector::set_validate_endpoint (TAO_Endpoint *endpoint) { - TAO_Transport *&transport = invocation->transport (); - - TAO_Endpoint *endpoint = desc->endpoint (); - if (endpoint->tag () != TAO_TAG_UDP_PROFILE) return -1; TAO_DIOP_Endpoint *diop_endpoint = ACE_dynamic_cast (TAO_DIOP_Endpoint *, endpoint ); + if (diop_endpoint == 0) return -1; @@ -129,6 +125,26 @@ TAO_DIOP_Connector::make_connection (TAO_GIOP_Invocation *invocation, return -1; } + return 0; +} + +int +TAO_DIOP_Connector::make_connection (TAO_GIOP_Invocation *invocation, + TAO_Transport_Descriptor_Interface *desc) +{ + TAO_Transport *&transport = invocation->transport (); + + TAO_DIOP_Endpoint *diop_endpoint = + ACE_dynamic_cast (TAO_DIOP_Endpoint *, + desc->endpoint ()); + + if (diop_endpoint == 0) + return -1; + + const ACE_INET_Addr &remote_address = + diop_endpoint->object_addr (); + + TAO_DIOP_Connection_Handler *svc_handler = 0; if (svc_handler_table_.find (remote_address, svc_handler) == -1) diff --git a/TAO/tao/Strategies/DIOP_Connector.h b/TAO/tao/Strategies/DIOP_Connector.h index 7fa1a059216..172a8ab8caa 100644 --- a/TAO/tao/Strategies/DIOP_Connector.h +++ b/TAO/tao/Strategies/DIOP_Connector.h @@ -63,6 +63,8 @@ protected: /// = More TAO_Connector methods, please check the documentation on /// Transport_Acceptor.h + int set_validate_endpoint (TAO_Endpoint *ep); + int make_connection (TAO_GIOP_Invocation *invocation, TAO_Transport_Descriptor_Interface *desc); diff --git a/TAO/tao/Strategies/SHMIOP_Connector.cpp b/TAO/tao/Strategies/SHMIOP_Connector.cpp index 67d2b604eef..71eb6745c89 100644 --- a/TAO/tao/Strategies/SHMIOP_Connector.cpp +++ b/TAO/tao/Strategies/SHMIOP_Connector.cpp @@ -113,6 +113,42 @@ TAO_SHMIOP_Connector::close (void) } int +TAO_SHMIOP_Connector::set_validate_endpoint (TAO_Endpoint *endpoint) +{ + if (endpoint->tag () != TAO_TAG_SHMEM_PROFILE) + return -1; + + TAO_SHMIOP_Endpoint *shmiop_endpoint = + ACE_dynamic_cast (TAO_SHMIOP_Endpoint *, + endpoint ); + if (shmiop_endpoint == 0) + return -1; + + const ACE_INET_Addr &remote_address = + shmiop_endpoint->object_addr (); + + // Verify that the remote ACE_INET_Addr was initialized properly. + // Failure can occur if hostname lookup failed when initializing the + // remote ACE_INET_Addr. + if (remote_address.get_type () != AF_INET) + { + if (TAO_debug_level > 0) + { + ACE_DEBUG ((LM_DEBUG, + ACE_LIB_TEXT ("TAO (%P|%t) IIOP connection failed.\n") + ACE_LIB_TEXT ("TAO (%P|%t) This is most likely ") + ACE_LIB_TEXT ("due to a hostname lookup ") + ACE_LIB_TEXT ("failure.\n"))); + } + + return -1; + } + + return 0; + +} + +int TAO_SHMIOP_Connector::make_connection (TAO_GIOP_Invocation *invocation, TAO_Transport_Descriptor_Interface *desc) { @@ -122,14 +158,9 @@ TAO_SHMIOP_Connector::make_connection (TAO_GIOP_Invocation *invocation, ACE_TEXT ("looking for SHMIOP connection.\n"))); ACE_Time_Value *max_wait_time = invocation->max_wait_time (); - TAO_Endpoint *endpoint = desc->endpoint (); - - if (endpoint->tag () != TAO_TAG_SHMEM_PROFILE) - return -1; - TAO_SHMIOP_Endpoint *shmiop_endpoint = ACE_dynamic_cast (TAO_SHMIOP_Endpoint *, - endpoint); + desc->endpoint ()); if (shmiop_endpoint == 0) return -1; @@ -137,23 +168,6 @@ TAO_SHMIOP_Connector::make_connection (TAO_GIOP_Invocation *invocation, const ACE_INET_Addr &remote_address = shmiop_endpoint->object_addr (); - // Verify that the remote ACE_INET_Addr was initialized properly. - // Failure can occur if hostname lookup failed when initializing the - // remote ACE_INET_Addr. - if (remote_address.get_type () != AF_INET) - { - if (TAO_debug_level > 0) - { - ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("TAO (%P|%t) SHMIOP connection failed.\n") - ACE_TEXT ("TAO (%P|%t) This is most likely ") - ACE_TEXT ("due to a hostname lookup ") - ACE_TEXT ("failure.\n"))); - } - - return -1; - } - int result = 0; TAO_SHMIOP_Connection_Handler *svc_handler = 0; @@ -194,7 +208,7 @@ TAO_SHMIOP_Connector::make_connection (TAO_GIOP_Invocation *invocation, if (result == -1) { char buffer [MAXNAMELEN * 2]; - endpoint->addr_to_string (buffer, + desc->endpoint ()->addr_to_string (buffer, (MAXNAMELEN * 2) - 1); // Give users a clue to the problem. diff --git a/TAO/tao/Strategies/SHMIOP_Connector.h b/TAO/tao/Strategies/SHMIOP_Connector.h index a887a06796e..54f16792aca 100644 --- a/TAO/tao/Strategies/SHMIOP_Connector.h +++ b/TAO/tao/Strategies/SHMIOP_Connector.h @@ -65,14 +65,6 @@ public: virtual char object_key_delimiter (void) const; -protected: - // = More TAO_Connector methods, please check the documentation on - // Transport_Connector.h - int make_connection (TAO_GIOP_Invocation *invocation, - TAO_Transport_Descriptor_Interface *desc); - - virtual TAO_Profile *make_profile (ACE_ENV_SINGLE_ARG_DECL); - public: typedef TAO_Connect_Concurrency_Strategy<TAO_SHMIOP_Connection_Handler> @@ -88,6 +80,17 @@ public: typedef ACE_Strategy_Connector<TAO_SHMIOP_Connection_Handler, ACE_MEM_CONNECTOR> TAO_SHMIOP_BASE_CONNECTOR; + +protected: + // = More TAO_Connector methods, please check the documentation on + // Transport_Connector.h + int set_validate_endpoint (TAO_Endpoint *endpoint); + + int make_connection (TAO_GIOP_Invocation *invocation, + TAO_Transport_Descriptor_Interface *desc); + + virtual TAO_Profile *make_profile (ACE_ENV_SINGLE_ARG_DECL); + private: /// local address diff --git a/TAO/tao/Strategies/UIOP_Connector.cpp b/TAO/tao/Strategies/UIOP_Connector.cpp index d6f0eabed73..ec7adfc6832 100644 --- a/TAO/tao/Strategies/UIOP_Connector.cpp +++ b/TAO/tao/Strategies/UIOP_Connector.cpp @@ -107,6 +107,42 @@ TAO_UIOP_Connector::close (void) int +TAO_UIOP_Connector::set_validate_endpoint (TAO_Endpoint *endpoint) +{ + if (endpoint->tag () != TAO_TAG_UIOP_PROFILE) + return -1; + + TAO_UIOP_Endpoint *uiop_endpoint = + ACE_dynamic_cast (TAO_UIOP_Endpoint *, + endpoint ); + if (uiop_endpoint == 0) + return -1; + + const ACE_UNIX_Addr &remote_address = + uiop_endpoint->object_addr (); + + // @@ Note, POSIX.1g renames AF_UNIX to AF_LOCAL. + // Verify that the remote ACE_UNIX_Addr was initialized properly. + // Failure can occur if hostname lookup failed when initializing the + // remote ACE_INET_Addr. + if (remote_address.get_type () != AF_UNIX) + { + if (TAO_debug_level > 0) + { + ACE_DEBUG ((LM_DEBUG, + ACE_LIB_TEXT ("TAO (%P|%t) UIOP failure.\n") + ACE_LIB_TEXT ("TAO (%P|%t) This is most likely ") + ACE_LIB_TEXT ("due to a hostname lookup ") + ACE_LIB_TEXT ("failure.\n"))); + } + + return -1; + } + + return 0; +} + +int TAO_UIOP_Connector::make_connection (TAO_GIOP_Invocation *invocation, TAO_Transport_Descriptor_Interface *desc) { @@ -116,14 +152,10 @@ TAO_UIOP_Connector::make_connection (TAO_GIOP_Invocation *invocation, ACE_TEXT ("looking for UIOP connection.\n"))); ACE_Time_Value *max_wait_time = invocation->max_wait_time (); - TAO_Endpoint *endpoint = desc->endpoint (); - - if (endpoint->tag () != TAO_TAG_UIOP_PROFILE) - return -1; TAO_UIOP_Endpoint *uiop_endpoint = ACE_dynamic_cast (TAO_UIOP_Endpoint *, - endpoint); + desc->endpoint ()); if (uiop_endpoint == 0) return -1; @@ -131,13 +163,6 @@ TAO_UIOP_Connector::make_connection (TAO_GIOP_Invocation *invocation, const ACE_UNIX_Addr &remote_address = uiop_endpoint->object_addr (); - // @@ Note, POSIX.1g renames AF_UNIX to AF_LOCAL. - - // Verify that the remote ACE_UNIX_Addr was initialized properly. - // Failure should never occur in the case of an ACE_UNIX_Addr! - if (remote_address.get_type () != AF_UNIX) - return -1; - int result = 0; TAO_UIOP_Connection_Handler *svc_handler = 0; diff --git a/TAO/tao/Strategies/UIOP_Connector.h b/TAO/tao/Strategies/UIOP_Connector.h index c62913e2344..adf8e1e18d6 100644 --- a/TAO/tao/Strategies/UIOP_Connector.h +++ b/TAO/tao/Strategies/UIOP_Connector.h @@ -70,6 +70,22 @@ public: virtual char object_key_delimiter (void) const; //@} +public: + + typedef TAO_Connect_Concurrency_Strategy<TAO_UIOP_Connection_Handler> + TAO_UIOP_CONNECT_CONCURRENCY_STRATEGY; + + typedef TAO_Connect_Creation_Strategy<TAO_UIOP_Connection_Handler> + TAO_UIOP_CONNECT_CREATION_STRATEGY; + + typedef ACE_Connect_Strategy<TAO_UIOP_Connection_Handler, + ACE_LSOCK_CONNECTOR> + TAO_UIOP_CONNECT_STRATEGY ; + + typedef ACE_Strategy_Connector<TAO_UIOP_Connection_Handler, + ACE_LSOCK_CONNECTOR> + TAO_UIOP_BASE_CONNECTOR; + protected: /** @@ -78,6 +94,8 @@ protected: * Please check the documentation in Transport_Connector.h. */ //@{ + int set_validate_endpoint (TAO_Endpoint *endpoint); + int make_connection (TAO_GIOP_Invocation *invocation, TAO_Transport_Descriptor_Interface *desc); @@ -88,22 +106,6 @@ protected: int init_uiop_properties (void); //@} -public: - - typedef TAO_Connect_Concurrency_Strategy<TAO_UIOP_Connection_Handler> - TAO_UIOP_CONNECT_CONCURRENCY_STRATEGY; - - typedef TAO_Connect_Creation_Strategy<TAO_UIOP_Connection_Handler> - TAO_UIOP_CONNECT_CREATION_STRATEGY; - - typedef ACE_Connect_Strategy<TAO_UIOP_Connection_Handler, - ACE_LSOCK_CONNECTOR> - TAO_UIOP_CONNECT_STRATEGY ; - - typedef ACE_Strategy_Connector<TAO_UIOP_Connection_Handler, - ACE_LSOCK_CONNECTOR> - TAO_UIOP_BASE_CONNECTOR; - private: /// Our connect strategy diff --git a/TAO/tao/Transport_Connector.cpp b/TAO/tao/Transport_Connector.cpp index 429a493efcc..6b91f9b3667 100644 --- a/TAO/tao/Transport_Connector.cpp +++ b/TAO/tao/Transport_Connector.cpp @@ -207,6 +207,9 @@ TAO_Connector::connect (TAO_GIOP_Invocation *invocation, TAO_Transport_Descriptor_Interface *desc ACE_ENV_ARG_DECL_NOT_USED) { + if (this->set_validate_endpoint (desc->endpoint ()) == -1) + return -1; + TAO_Transport *base_transport = 0; // Check the Cache first for connections diff --git a/TAO/tao/Transport_Connector.h b/TAO/tao/Transport_Connector.h index df7601477ce..6d37dc57d41 100644 --- a/TAO/tao/Transport_Connector.h +++ b/TAO/tao/Transport_Connector.h @@ -25,6 +25,7 @@ class TAO_Transport_Descriptor_Interface; class TAO_InputCDR; +class TAO_Endpoint; class TAO_GIOP_Invocation; class TAO_Profile; class TAO_MProfile; @@ -101,6 +102,10 @@ protected: /// Create a profile with a given endpoint. virtual TAO_Profile *make_profile (ACE_ENV_SINGLE_ARG_DECL) = 0; + /// Set and validate endpoint. We need to do this to initialize our + /// remote *_Addr's which have not been done during IOR decode. + virtual int set_validate_endpoint (TAO_Endpoint *endpoint) = 0; + /// Do an actual connect using the underlying transport to make a /// connection virtual int make_connection (TAO_GIOP_Invocation *invocation, |