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

TAO_GIOP_Message_Base Class Reference

Definitions of the GIOP specific stuff. More...

#include <GIOP_Message_Base.h>

Inheritance diagram for TAO_GIOP_Message_Base:

Inheritance graph
[legend]
Collaboration diagram for TAO_GIOP_Message_Base:

Collaboration graph
[legend]
List of all members.

Public Methods

 TAO_GIOP_Message_Base (TAO_ORB_Core *orb_core, size_t input_cdr_size=ACE_CDR::DEFAULT_BUFSIZE)
 Constructor. More...

virtual ~TAO_GIOP_Message_Base (void)
 Dtor. More...

virtual void init (CORBA::Octet major, CORBA::Octet minor)
 Initialize the underlying state object based on the <major> and <minor> revision numbers. More...

virtual void reset (void)
 Reset the messaging the object. More...

virtual int generate_request_header (TAO_Operation_Details &op, TAO_Target_Specification &spec, TAO_OutputCDR &cdr)
 Write the RequestHeader in to the <cdr> stream. The underlying implementation of the mesaging should do the right thing. More...

virtual int generate_locate_request_header (TAO_Operation_Details &op, TAO_Target_Specification &spec, TAO_OutputCDR &cdr)
 Write the RequestHeader in to the <cdr> stream. More...

virtual int generate_reply_header (TAO_OutputCDR &cdr, TAO_Pluggable_Reply_Params_Base &params)
 Write the reply header. More...

virtual int read_message (TAO_Transport *transport, int block=0, ACE_Time_Value *max_wait_time=0)
 This method reads the message on the connection. Returns 0 when there is short read on the connection. Returns 1 when the full message is read and handled. Returns -1 on errors. If <block> is 1, then reply is read in a blocking manner. More...

virtual int format_message (TAO_OutputCDR &cdr)
 Format the message. As we have not written the message length in the header, we make use of this oppurtunity to insert and format the message. More...

virtual int parse_incoming_messages (ACE_Message_Block &message_block)
 Parse the incoming messages.. More...

virtual ssize_t missing_data (ACE_Message_Block &message_block)
 Calculate the amount of data that is missing in the <incoming> message block. More...

virtual int extract_next_message (ACE_Message_Block &incoming, TAO_Queued_Data *&qd)
virtual int consolidate_node (TAO_Queued_Data *qd, ACE_Message_Block &incoming)
 Check whether the node <qd> needs consolidation from <incoming>. More...

virtual void get_message_data (TAO_Queued_Data *qd)
 Get the details of the message parsed through the <qd>. More...

virtual int consolidate_fragments (TAO_Queued_Data *dqd, const TAO_Queued_Data *sqd)
 Bala:Docu?? More...

virtual int process_request_message (TAO_Transport *transport, TAO_Queued_Data *qd)
 Process the request message that we have received on the connection. More...

virtual int process_reply_message (TAO_Pluggable_Reply_Params &reply_info, TAO_Queued_Data *qd)
 Parse the reply message that we received and return the reply information though <reply_info>. More...

virtual int generate_exception_reply (TAO_OutputCDR &cdr, TAO_Pluggable_Reply_Params_Base &params, CORBA::Exception &x)
 Generate a reply message with the exception <ex>. More...

virtual size_t header_length (void) const
 Header length. More...


Protected Methods

int process_request (TAO_Transport *transport, TAO_InputCDR &input, TAO_OutputCDR &output, TAO_GIOP_Message_Generator_Parser *)
 Processes the <GIOP_REQUEST> messages. More...

int process_locate_request (TAO_Transport *transport, TAO_InputCDR &input, TAO_OutputCDR &output, TAO_GIOP_Message_Generator_Parser *)
 Processes the <GIOP_LOCATE_REQUEST> messages. More...

void set_state (CORBA::Octet major, CORBA::Octet minor, TAO_GIOP_Message_Generator_Parser *&)
 Set the state. More...

void dump_msg (const char *label, const u_char *ptr, size_t len)
 Print out a debug messages.. More...

TAO_Pluggable_Message_Type message_type (TAO_GIOP_Message_State &state)
 Get the message type. The return value would be one of the following: TAO_PLUGGABLE_MESSAGE_REQUEST, TAO_PLUGGABLE_MESSAGE_REPLY, TAO_PLUGGABLE_MESSAGE_CLOSECONNECTION, TAO_PLUGGABLE_MESSAGE_MESSAGE_ERROR. More...


Private Methods

int write_protocol_header (TAO_GIOP_Message_Type t, TAO_OutputCDR &msg)
 Writes the GIOP header in to <msg> NOTE: If the GIOP header happens to change in the future, we can push this method in to the generator_parser classes. More...

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 *)
 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. More...

int send_error (TAO_Transport *transport)
 Send error messages. More...

void send_close_connection (const TAO_GIOP_Message_Version &version, TAO_Transport *transport, void *ctx)
 Close a connection, first sending GIOP::CloseConnection. More...

int send_reply_exception (TAO_Transport *transport, TAO_OutputCDR &cdr, CORBA::ULong request_id, IOP::ServiceContextList *svc_info, CORBA::Exception *x)
 We must send a LocateReply through <transport>, this request resulted in some kind of exception. More...

virtual int generate_locate_reply_header (TAO_OutputCDR &, TAO_Pluggable_Reply_Params_Base &)
 Write the locate reply header. More...

virtual int is_ready_for_bidirectional (TAO_OutputCDR &msg)
 Is the messaging object ready for processing BiDirectional request/response? More...

TAO_Queued_Datamake_queued_data (size_t sz)
 Creates a new node for the queue with a message block in the node of size <sz>.. More...


Private Attributes

TAO_ORB_Coreorb_core_
 Cached ORB_Core pointer... More...

TAO_GIOP_Message_State message_state_
 Thr message handler object that does reading and parsing of the incoming messages. More...

TAO_GIOP_Message_Generator_Parser_Impl tao_giop_impl_
 All the implementations of GIOP message generator and parsers. More...


Detailed Description

Definitions of the GIOP specific stuff.

This class will hold the specific details common to all the GIOP versions. Some of them which are here may be shifted if things start changing between versions. This class uses the TAO_GIOP_Message_Reactive_Handler to read and parse messages.


Constructor & Destructor Documentation

TAO_GIOP_Message_Base::TAO_GIOP_Message_Base TAO_ORB_Core   orb_core,
size_t    input_cdr_size = ACE_CDR::DEFAULT_BUFSIZE
 

Constructor.

TAO_GIOP_Message_Base::~TAO_GIOP_Message_Base void    [virtual]
 

Dtor.


Member Function Documentation

int TAO_GIOP_Message_Base::consolidate_fragments TAO_Queued_Data   dqd,
const TAO_Queued_Data   sqd
[virtual]
 

Bala:Docu??

@

Reimplemented from TAO_Pluggable_Messaging.

int TAO_GIOP_Message_Base::consolidate_node TAO_Queued_Data   qd,
ACE_Message_Block   incoming
[virtual]
 

Check whether the node <qd> needs consolidation from <incoming>.

Reimplemented from TAO_Pluggable_Messaging.

void TAO_GIOP_Message_Base::dump_msg const char *    label,
const u_char *    ptr,
size_t    len
[protected]
 

Print out a debug messages..

int TAO_GIOP_Message_Base::extract_next_message ACE_Message_Block   incoming,
TAO_Queued_Data *&    qd
[virtual]
 

Reimplemented from TAO_Pluggable_Messaging.

int TAO_GIOP_Message_Base::format_message TAO_OutputCDR   stream [virtual]
 

Format the message. As we have not written the message length in the header, we make use of this oppurtunity to insert and format the message.

Reimplemented from TAO_Pluggable_Messaging.

int TAO_GIOP_Message_Base::generate_exception_reply TAO_OutputCDR   cdr,
TAO_Pluggable_Reply_Params_Base   params,
CORBA::Exception   x
[virtual]
 

Generate a reply message with the exception <ex>.

Reimplemented from TAO_Pluggable_Messaging.

int TAO_GIOP_Message_Base::generate_locate_reply_header TAO_OutputCDR   cdr,
TAO_Pluggable_Reply_Params_Base   params
[private, virtual]
 

Write the locate reply header.

Reimplemented from TAO_Pluggable_Messaging.

int TAO_GIOP_Message_Base::generate_locate_request_header TAO_Operation_Details   op,
TAO_Target_Specification   spec,
TAO_OutputCDR   cdr
[virtual]
 

Write the RequestHeader in to the <cdr> stream.

Reimplemented from TAO_Pluggable_Messaging.

int TAO_GIOP_Message_Base::generate_reply_header TAO_OutputCDR   cdr,
TAO_Pluggable_Reply_Params_Base   params
[virtual]
 

Write the reply header.

Reimplemented from TAO_Pluggable_Messaging.

int TAO_GIOP_Message_Base::generate_request_header TAO_Operation_Details   op,
TAO_Target_Specification   spec,
TAO_OutputCDR   cdr
[virtual]
 

Write the RequestHeader in to the <cdr> stream. The underlying implementation of the mesaging should do the right thing.

Reimplemented from TAO_Pluggable_Messaging.

void TAO_GIOP_Message_Base::get_message_data TAO_Queued_Data   qd [virtual]
 

Get the details of the message parsed through the <qd>.

Reimplemented from TAO_Pluggable_Messaging.

size_t TAO_GIOP_Message_Base::header_length void    const [virtual]
 

Header length.

Reimplemented from TAO_Pluggable_Messaging.

void TAO_GIOP_Message_Base::init CORBA::Octet    major,
CORBA::Octet    minor
[virtual]
 

Initialize the underlying state object based on the <major> and <minor> revision numbers.

Reimplemented from TAO_Pluggable_Messaging.

int TAO_GIOP_Message_Base::is_ready_for_bidirectional TAO_OutputCDR   msg [private, virtual]
 

Is the messaging object ready for processing BiDirectional request/response?

Reimplemented from TAO_Pluggable_Messaging.

TAO_Queued_Data * TAO_GIOP_Message_Base::make_queued_data size_t    sz [private]
 

Creates a new node for the queue with a message block in the node of size <sz>..

int TAO_GIOP_Message_Base::make_send_locate_reply TAO_Transport   transport,
TAO_GIOP_Locate_Request_Header   request,
TAO_GIOP_Locate_Status_Msg   status_info,
TAO_OutputCDR   output,
TAO_GIOP_Message_Generator_Parser   parser
[private]
 

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.

TAO_Pluggable_Message_Type TAO_GIOP_Message_Base::message_type TAO_GIOP_Message_State   msg_state [protected]
 

Get the message type. The return value would be one of the following: TAO_PLUGGABLE_MESSAGE_REQUEST, TAO_PLUGGABLE_MESSAGE_REPLY, TAO_PLUGGABLE_MESSAGE_CLOSECONNECTION, TAO_PLUGGABLE_MESSAGE_MESSAGE_ERROR.

ssize_t TAO_GIOP_Message_Base::missing_data ACE_Message_Block   incoming [virtual]
 

Calculate the amount of data that is missing in the <incoming> message block.

Reimplemented from TAO_Pluggable_Messaging.

int TAO_GIOP_Message_Base::parse_incoming_messages ACE_Message_Block   incoming [virtual]
 

Parse the incoming messages..

Reimplemented from TAO_Pluggable_Messaging.

int TAO_GIOP_Message_Base::process_locate_request TAO_Transport   transport,
TAO_InputCDR   input,
TAO_OutputCDR   output,
TAO_GIOP_Message_Generator_Parser   parser
[protected]
 

Processes the <GIOP_LOCATE_REQUEST> messages.

int TAO_GIOP_Message_Base::process_reply_message TAO_Pluggable_Reply_Params   params,
TAO_Queued_Data   qd
[virtual]
 

Parse the reply message that we received and return the reply information though <reply_info>.

Reimplemented from TAO_Pluggable_Messaging.

int TAO_GIOP_Message_Base::process_request TAO_Transport   transport,
TAO_InputCDR   cdr,
TAO_OutputCDR   output,
TAO_GIOP_Message_Generator_Parser   parser
[protected]
 

Processes the <GIOP_REQUEST> messages.

int TAO_GIOP_Message_Base::process_request_message TAO_Transport   transport,
TAO_Queued_Data   qd
[virtual]
 

Process the request message that we have received on the connection.

Reimplemented from TAO_Pluggable_Messaging.

int TAO_GIOP_Message_Base::read_message TAO_Transport   transport,
int    block = 0,
ACE_Time_Value   max_wait_time = 0
[virtual]
 

This method reads the message on the connection. Returns 0 when there is short read on the connection. Returns 1 when the full message is read and handled. Returns -1 on errors. If <block> is 1, then reply is read in a blocking manner.

Reimplemented from TAO_Pluggable_Messaging.

void TAO_GIOP_Message_Base::reset void    [virtual]
 

Reset the messaging the object.

Reimplemented from TAO_Pluggable_Messaging.

void TAO_GIOP_Message_Base::send_close_connection const TAO_GIOP_Message_Version   version,
TAO_Transport   transport,
void *    ctx
[private]
 

Close a connection, first sending GIOP::CloseConnection.

int TAO_GIOP_Message_Base::send_error TAO_Transport   transport [private]
 

Send error messages.

int TAO_GIOP_Message_Base::send_reply_exception TAO_Transport   transport,
TAO_OutputCDR   output,
CORBA::ULong    request_id,
IOP::ServiceContextList   svc_info,
CORBA::Exception   x
[private]
 

We must send a LocateReply through <transport>, this request resulted in some kind of exception.

void TAO_GIOP_Message_Base::set_state CORBA::Octet    def_major,
CORBA::Octet    def_minor,
TAO_GIOP_Message_Generator_Parser *&    gen_parser
[protected]
 

Set the state.

int TAO_GIOP_Message_Base::write_protocol_header TAO_GIOP_Message_Type    t,
TAO_OutputCDR   msg
[private]
 

Writes the GIOP header in to <msg> NOTE: If the GIOP header happens to change in the future, we can push this method in to the generator_parser classes.


Member Data Documentation

TAO_GIOP_Message_State TAO_GIOP_Message_Base::message_state_ [private]
 

Thr message handler object that does reading and parsing of the incoming messages.

TAO_ORB_Core* TAO_GIOP_Message_Base::orb_core_ [private]
 

Cached ORB_Core pointer...

TAO_GIOP_Message_Generator_Parser_Impl TAO_GIOP_Message_Base::tao_giop_impl_ [private]
 

All the implementations of GIOP message generator and parsers.


The documentation for this class was generated from the following files:
Generated on Thu Oct 10 18:33:54 2002 for TAO by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001