Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

TAO_GIOP_Locate_Request_Invocation Class Reference

Sends a locate request message. More...

#include <Invocation.h>

Inheritance diagram for TAO_GIOP_Locate_Request_Invocation:

Inheritance graph
[legend]
Collaboration diagram for TAO_GIOP_Locate_Request_Invocation:

Collaboration graph
[legend]
List of all members.

Public Methods

 TAO_GIOP_Locate_Request_Invocation (TAO_Stub *data, TAO_ORB_Core *orb_core)
 Constructor. More...

 ~TAO_GIOP_Locate_Request_Invocation (void)
 Destructor. More...

void start (ACE_ENV_SINGLE_ARG_DECL) throw (CORBA::SystemException)
 Establishes a connection to the remote server, initializes the GIOP headers in the output CDR. More...

int invoke (ACE_ENV_SINGLE_ARG_DECL) throw (CORBA::SystemException)
 Send request, without blocking for any response. More...


Detailed Description

Sends a locate request message.

Definition at line 485 of file Invocation.h.


Constructor & Destructor Documentation

ACE_INLINE TAO_GIOP_Locate_Request_Invocation::TAO_GIOP_Locate_Request_Invocation TAO_Stub   data,
TAO_ORB_Core   orb_core
 

Constructor.

Definition at line 207 of file Invocation.i.

00209   : TAO_GIOP_Synch_Invocation (stub,
00210                                0,
00211                                0,
00212                                0,
00213                                orb_core)
00214 {
00215 }

ACE_INLINE TAO_GIOP_Locate_Request_Invocation::~TAO_GIOP_Locate_Request_Invocation void   
 

Destructor.

Definition at line 218 of file Invocation.i.

00219 {
00220 }


Member Function Documentation

int TAO_GIOP_Locate_Request_Invocation::invoke ACE_ENV_SINGLE_ARG_DECL    throw (CORBA::SystemException)
 

Send request, without blocking for any response.

Definition at line 1085 of file Invocation.cpp.

References ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_DECL, ACE_THROW_RETURN, TAO_DEFAULT_MINOR_CODE, TAO_GIOP_LOC_NEEDS_ADDRESSING_MODE, TAO_GIOP_LOC_SYSTEM_EXCEPTION, TAO_GIOP_OBJECT_FORWARD, TAO_GIOP_OBJECT_HERE, TAO_GIOP_UNKNOWN_OBJECT, TAO_INVOKE_EXCEPTION, TAO_INVOKE_OK, and TAO_INVOKE_RESTART.

Referenced by TAO_Stub::validate_connection.

01087 {
01088   if (this->transport_ == 0)
01089     {
01090       ACE_THROW_RETURN (CORBA::INTERNAL (),
01091                         TAO_INVOKE_EXCEPTION);
01092     }
01093 
01094   CORBA::ULong locate_status = this->invoke_i (1
01095                                                ACE_ENV_ARG_PARAMETER);
01096   ACE_CHECK_RETURN (TAO_INVOKE_EXCEPTION);
01097 
01098   switch (locate_status)
01099     {
01100     case TAO_GIOP_OBJECT_HERE:
01101       break;
01102     case TAO_GIOP_UNKNOWN_OBJECT:
01103       ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (TAO_DEFAULT_MINOR_CODE,
01104                                                  CORBA::COMPLETED_YES),
01105                         TAO_INVOKE_EXCEPTION);
01106       // NOTREACHED.
01107     case TAO_GIOP_OBJECT_FORWARD:
01108       return this->location_forward (this->inp_stream ()
01109                                      ACE_ENV_ARG_PARAMETER);
01110     case TAO_GIOP_LOC_SYSTEM_EXCEPTION:
01111       {
01112         // Pull the exception from the stream.
01113         CORBA::String_var buf;
01114 
01115         if ((this->inp_stream () >> buf.inout ()) == 0)
01116           {
01117             // Could not demarshal the exception id, raise a local
01118             // CORBA::MARSHAL exception.
01119             ACE_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE,
01120                                               CORBA::COMPLETED_MAYBE),
01121                               TAO_INVOKE_EXCEPTION);
01122           }
01123 
01124         // This kind of exception shouldn't happen with oneways,
01125         // but if it does, we turn it into a CORBA::UNKNOWN exception.
01126         ACE_THROW_RETURN (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE,
01127                                           CORBA::COMPLETED_YES),
01128                           TAO_INVOKE_EXCEPTION);
01129       }
01130     case TAO_GIOP_LOC_NEEDS_ADDRESSING_MODE:
01131       {
01132         // We have received an exception with a request to change the
01133         // addressing mode. First let us read the mode that the
01134         // server/agent asks for.
01135         CORBA::Short addr_mode = 0;
01136 
01137         if (this->inp_stream ().read_short (addr_mode) == 0)
01138           {
01139             // Could not demarshal the addressing disposition, raise a local
01140             // CORBA::MARSHAL exception.
01141             ACE_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE,
01142                                               CORBA::COMPLETED_MAYBE),
01143                               TAO_INVOKE_OK);
01144           }
01145 
01146         // Now set this addressing mode in the profile, so that
01147         // the next invocation need not go through this.
01148         this->profile_->addressing_mode (addr_mode
01149                                          ACE_ENV_ARG_PARAMETER);
01150 
01151         // Restart the invocation.
01152         return TAO_INVOKE_RESTART;
01153       }
01154     }
01155 
01156   return TAO_INVOKE_OK;
01157 }

void TAO_GIOP_Locate_Request_Invocation::start ACE_ENV_SINGLE_ARG_DECL    throw (CORBA::SystemException)
 

Establishes a connection to the remote server, initializes the GIOP headers in the output CDR.

Reimplemented from TAO_GIOP_Invocation.

Definition at line 1071 of file Invocation.cpp.

References ACE_CHECK, ACE_ENV_SINGLE_ARG_DECL, ACE_ENV_SINGLE_ARG_PARAMETER, TAO_LF_Event::LFS_ACTIVE, and TAO_GIOP_Invocation::start.

Referenced by TAO_Stub::validate_connection.

01073 {
01074   TAO_GIOP_Invocation::start (ACE_ENV_SINGLE_ARG_PARAMETER);
01075   ACE_CHECK;
01076 
01077   this->transport_->generate_locate_request (this->target_spec_,
01078                                              this->op_details_,
01079                                              this->out_stream_);
01080   this->rd_.state_changed (TAO_LF_Event::LFS_ACTIVE);
01081 }


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 15:16:46 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002