TAO_GIOP_Message_Lite Class Reference

Definitions of GIOPLite specific stuff. More...

#include <GIOP_Message_Lite.h>

Inheritance diagram for TAO_GIOP_Message_Lite:

Inheritance graph
[legend]
Collaboration diagram for TAO_GIOP_Message_Lite:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_GIOP_Message_Lite (TAO_ORB_Core *orb_core, size_t input_cdr_size=ACE_CDR::DEFAULT_BUFSIZE)
 Constructor.
virtual ~TAO_GIOP_Message_Lite (void)
 Dtor.
virtual void init (CORBA::Octet, CORBA::Octet)
 Initialize the object -- this is a dummy for GIOPlite.
virtual void reset (void)
 Reset the messaging the object.
virtual int generate_request_header (TAO_Operation_Details &op, TAO_Target_Specification &spec, TAO_OutputCDR &cdr)
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.
virtual int generate_reply_header (TAO_OutputCDR &cdr, TAO_Pluggable_Reply_Params_Base &params)
 Write the reply header.
virtual int generate_fragment_header (TAO_OutputCDR &cdr, CORBA::ULong request_id)
virtual int format_message (TAO_OutputCDR &cdr)
virtual int parse_next_message (ACE_Message_Block &incoming, TAO_Queued_Data &qd, size_t &mesg_length)
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.
virtual int process_request_message (TAO_Transport *transport, TAO_Queued_Data *qd)
virtual int process_reply_message (TAO_Pluggable_Reply_Params &reply_info, TAO_Queued_Data *qd)
virtual int generate_exception_reply (TAO_OutputCDR &cdr, TAO_Pluggable_Reply_Params_Base &params, const CORBA::Exception &x)
 Generate a reply message with the exception ex.
virtual int consolidate_fragmented_message (TAO_Queued_Data *qd, TAO_Queued_Data *&msg)
virtual int discard_fragmented_message (const TAO_Queued_Data *cancel_request)
virtual TAO_GIOP_Fragmentation_Strategyfragmentation_strategy (void)
 Outgoing GIOP message fragmentation strategy.

Private Member Functions

int parse_incoming_messages (ACE_Message_Block &message_block)
TAO_Pluggable_Message_Type message_type (void) const
int write_protocol_header (TAO_GIOP_Message_Type t, TAO_OutputCDR &msg)
int process_request (TAO_Transport *transport, TAO_InputCDR &input, TAO_OutputCDR &output)
 Processes the GIOP_REQUEST messages.
int process_locate_request (TAO_Transport *transport, TAO_InputCDR &input, TAO_OutputCDR &output)
 Processes the GIOP_LOCATE_REQUEST messages.
int make_send_locate_reply (TAO_Transport *transport, TAO_OutputCDR &output, TAO_GIOP_Locate_Request_Header &request, TAO_GIOP_Locate_Status_Msg &status)
int send_error (TAO_Transport *transport)
 Send error messages.
void send_close_connection (const TAO_GIOP_Message_Version &version, TAO_Transport *transport, void *ctx)
 Close a connection, first sending GIOP::CloseConnection.
int send_reply_exception (TAO_Transport *transport, TAO_ORB_Core *orb_core, CORBA::ULong request_id, IOP::ServiceContextList *svc_info, CORBA::Exception *x)
void dump_msg (const char *label, const u_char *ptr, size_t len)
 Print out a debug messages..
TAO_Queued_Datamake_queued_data (size_t sz)
virtual int generate_locate_reply_header (TAO_OutputCDR &, TAO_Pluggable_Reply_Params_Base &)
 Write the locate reply header.
virtual int is_ready_for_bidirectional (TAO_OutputCDR &msg)
virtual size_t header_length (void) const
 Header length.
virtual size_t fragment_header_length (CORBA::Octet major, CORBA::Octet minor) const
 Fragment header length.
virtual TAO_OutputCDRout_stream (void)
 Accessor for the output CDR stream.
int write_request_header (const TAO_Operation_Details &opdetails, TAO_Target_Specification &spec, TAO_OutputCDR &msg)
 Write the request header in to <msg>.
int write_locate_request_header (CORBA::ULong request_id, TAO_Target_Specification &spec, TAO_OutputCDR &msg)
 Write the LocateRequest header.
int write_reply_header (TAO_OutputCDR &output, TAO_Pluggable_Reply_Params_Base &reply)
 Write the reply header in to <output>.
int write_locate_reply_mesg (TAO_OutputCDR &output, CORBA::ULong request_id, TAO_GIOP_Locate_Status_Msg &status)
 Writes the locate _reply message in to the <output>.
int parse_request_header (TAO_ServerRequest &)
int parse_locate_header (TAO_GIOP_Locate_Request_Header &)
int parse_reply (TAO_InputCDR &input, TAO_Pluggable_Reply_Params &params)
 Parse the reply message.
int parse_locate_reply (TAO_InputCDR &input, TAO_Pluggable_Reply_Params &params)
 Parse the locate reply message from the server.
void init_queued_data (TAO_Queued_Data *qd) const
 Initialize the relevant portions of a TAO_Queued_Data.

Private Attributes

TAO_ORB_Coreorb_core_
 Our copy of the ORB core...
CORBA::Octet message_type_
 The message type that we are going to process..
CORBA::ULong message_size_
 The pay load size.
CORBA::Octet byte_order_
TAO_OutputCDR cdr_

Detailed Description

Definitions of GIOPLite specific stuff.

This protocol is a modified version of GIOP. This is more suited for homogenous platforms.


Constructor & Destructor Documentation

TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_GIOP_Message_Lite::TAO_GIOP_Message_Lite ( TAO_ORB_Core orb_core,
size_t  input_cdr_size = ACE_CDR::DEFAULT_BUFSIZE 
)

Constructor.

TAO_GIOP_Message_Lite::~TAO_GIOP_Message_Lite ( void   )  [virtual]

Dtor.


Member Function Documentation

int TAO_GIOP_Message_Lite::consolidate_fragmented_message ( TAO_Queued_Data qd,
TAO_Queued_Data *&  msg 
) [virtual]

Consolidate fragmented message with associated fragments, being stored withi this class. If reliable transport is used (like TCP) fragments are partialy ordered on stack, last fragment on top. Otherwise If un-reliable transport is used (like UDP) fragments may be dis-ordered, and must be ordered before consolidation.

Returns:
0 on success and msg points to consolidated message, 1 if there are still fragmens outstanding, in case of error -1 is being returned. In any case qd must be released by method implementation.

Implements TAO_Pluggable_Messaging.

int TAO_GIOP_Message_Lite::consolidate_node ( TAO_Queued_Data qd,
ACE_Message_Block incoming 
) [virtual]

Check whether the node qd needs consolidation from incoming.

Implements TAO_Pluggable_Messaging.

int TAO_GIOP_Message_Lite::discard_fragmented_message ( const TAO_Queued_Data cancel_request  )  [virtual]

Discard all fragments associated to request-id encoded in cancel_request. This operation will never be called concurrently by multiplpe threads nor concurrently to consolidate_fragmented_message 0 on success, 1 if no matching fragment chain exists, -1 on error

Implements TAO_Pluggable_Messaging.

void TAO_GIOP_Message_Lite::dump_msg ( const char *  label,
const u_char *  ptr,
size_t  len 
) [private]

Print out a debug messages..

int TAO_GIOP_Message_Lite::extract_next_message ( ACE_Message_Block incoming,
TAO_Queued_Data *&  qd 
) [virtual]

Extract the details of the next message from the incoming through qd. Returns 0 if the message header could not be parsed completely, returns a 1 if the message header could be parsed completely and returns -1 on error.

Implements TAO_Pluggable_Messaging.

int TAO_GIOP_Message_Lite::format_message ( TAO_OutputCDR cdr  )  [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.

Implements TAO_Pluggable_Messaging.

size_t TAO_GIOP_Message_Lite::fragment_header_length ( CORBA::Octet  major,
CORBA::Octet  minor 
) const [private, virtual]

Fragment header length.

Implements TAO_Pluggable_Messaging.

TAO_GIOP_Fragmentation_Strategy * TAO_GIOP_Message_Lite::fragmentation_strategy ( void   )  [virtual]

Outgoing GIOP message fragmentation strategy.

Implements TAO_Pluggable_Messaging.

int TAO_GIOP_Message_Lite::generate_exception_reply ( TAO_OutputCDR cdr,
TAO_Pluggable_Reply_Params_Base params,
const CORBA::Exception x 
) [virtual]

Generate a reply message with the exception ex.

Implements TAO_Pluggable_Messaging.

int TAO_GIOP_Message_Lite::generate_fragment_header ( TAO_OutputCDR cdr,
CORBA::ULong  request_id 
) [virtual]

Implements TAO_Pluggable_Messaging.

int TAO_GIOP_Message_Lite::generate_locate_reply_header ( TAO_OutputCDR ,
TAO_Pluggable_Reply_Params_Base  
) [private, virtual]

Write the locate reply header.

Implements TAO_Pluggable_Messaging.

int TAO_GIOP_Message_Lite::generate_locate_request_header ( TAO_Operation_Details op,
TAO_Target_Specification spec,
TAO_OutputCDR cdr 
) [virtual]

Write the RequestHeader in to the cdr stream.

Implements TAO_Pluggable_Messaging.

int TAO_GIOP_Message_Lite::generate_reply_header ( TAO_OutputCDR cdr,
TAO_Pluggable_Reply_Params_Base params 
) [virtual]

Write the reply header.

Implements TAO_Pluggable_Messaging.

int TAO_GIOP_Message_Lite::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.

Implements TAO_Pluggable_Messaging.

size_t TAO_GIOP_Message_Lite::header_length ( void   )  const [private, virtual]

Header length.

Implements TAO_Pluggable_Messaging.

void TAO_GIOP_Message_Lite::init ( CORBA::Octet  ,
CORBA::Octet   
) [virtual]

Initialize the object -- this is a dummy for GIOPlite.

Implements TAO_Pluggable_Messaging.

void TAO_GIOP_Message_Lite::init_queued_data ( TAO_Queued_Data qd  )  const [private]

Initialize the relevant portions of a TAO_Queued_Data.

int TAO_GIOP_Message_Lite::is_ready_for_bidirectional ( TAO_OutputCDR msg  )  [private, virtual]

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

Implements TAO_Pluggable_Messaging.

TAO_Queued_Data * TAO_GIOP_Message_Lite::make_queued_data ( size_t  sz  )  [private]

int TAO_GIOP_Message_Lite::make_send_locate_reply ( TAO_Transport transport,
TAO_OutputCDR output,
TAO_GIOP_Locate_Request_Header request,
TAO_GIOP_Locate_Status_Msg status 
) [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_Lite::message_type ( void   )  const [private]

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. TAO_PLUGGABLE_MESSAGE_MESSAGE_CANCELREQUEST.

TAO_OutputCDR & TAO_GIOP_Message_Lite::out_stream ( void   )  [private, virtual]

Accessor for the output CDR stream.

Implements TAO_Pluggable_Messaging.

int TAO_GIOP_Message_Lite::parse_incoming_messages ( ACE_Message_Block message_block  )  [private]

Parse the incoming messages..

Return values:
-1 There was some error parsing the GIOP header
0 The GIOP header was parsed correctly
1 There was not enough data in the message block to parse the header

int TAO_GIOP_Message_Lite::parse_locate_header ( TAO_GIOP_Locate_Request_Header  )  [private]

Parse the Loacte Request Header from the incoming stream. This will do a version specific parsing of the incoming Request header

int TAO_GIOP_Message_Lite::parse_locate_reply ( TAO_InputCDR input,
TAO_Pluggable_Reply_Params params 
) [private]

Parse the locate reply message from the server.

int TAO_GIOP_Message_Lite::parse_next_message ( ACE_Message_Block incoming,
TAO_Queued_Data qd,
size_t &  mesg_length 
) [virtual]

Parse the details of the next message from the incoming and initializes attributes of qd. Returns 0 if the message header could not be parsed completely, returns a 1 if the message header could be parsed completely and returns -1 on error.

Implements TAO_Pluggable_Messaging.

int TAO_GIOP_Message_Lite::parse_reply ( TAO_InputCDR input,
TAO_Pluggable_Reply_Params params 
) [private]

Parse the reply message.

int TAO_GIOP_Message_Lite::parse_request_header ( TAO_ServerRequest  )  [private]

Parse the Request Header from the incoming stream. This will do a version specific parsing of the incoming Request header

int TAO_GIOP_Message_Lite::process_locate_request ( TAO_Transport transport,
TAO_InputCDR input,
TAO_OutputCDR output 
) [private]

Processes the GIOP_LOCATE_REQUEST messages.

int TAO_GIOP_Message_Lite::process_reply_message ( TAO_Pluggable_Reply_Params reply_info,
TAO_Queued_Data qd 
) [virtual]

Parse the reply message that we received and return the reply information through reply_info

Implements TAO_Pluggable_Messaging.

int TAO_GIOP_Message_Lite::process_request ( TAO_Transport transport,
TAO_InputCDR input,
TAO_OutputCDR output 
) [private]

Processes the GIOP_REQUEST messages.

int TAO_GIOP_Message_Lite::process_request_message ( TAO_Transport transport,
TAO_Queued_Data qd 
) [virtual]

Process the request message that we have received on the connection

Implements TAO_Pluggable_Messaging.

void TAO_GIOP_Message_Lite::reset ( void   )  [virtual]

Reset the messaging the object.

Implements TAO_Pluggable_Messaging.

void TAO_GIOP_Message_Lite::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_Lite::send_error ( TAO_Transport transport  )  [private]

Send error messages.

int TAO_GIOP_Message_Lite::send_reply_exception ( TAO_Transport transport,
TAO_ORB_Core orb_core,
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.

int TAO_GIOP_Message_Lite::write_locate_reply_mesg ( TAO_OutputCDR output,
CORBA::ULong  request_id,
TAO_GIOP_Locate_Status_Msg status 
) [private]

Writes the locate _reply message in to the <output>.

int TAO_GIOP_Message_Lite::write_locate_request_header ( CORBA::ULong  request_id,
TAO_Target_Specification spec,
TAO_OutputCDR msg 
) [private]

Write the LocateRequest header.

int TAO_GIOP_Message_Lite::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.

int TAO_GIOP_Message_Lite::write_reply_header ( TAO_OutputCDR output,
TAO_Pluggable_Reply_Params_Base reply 
) [private]

Write the reply header in to <output>.

int TAO_GIOP_Message_Lite::write_request_header ( const TAO_Operation_Details opdetails,
TAO_Target_Specification spec,
TAO_OutputCDR msg 
) [private]

Write the request header in to <msg>.


Member Data Documentation

CORBA::Octet TAO_GIOP_Message_Lite::byte_order_ [private]

The byte order..

Note:
GIOP lite cannot work between heterogenous platforms..

TAO_OutputCDR TAO_GIOP_Message_Lite::cdr_ [private]

CORBA::ULong TAO_GIOP_Message_Lite::message_size_ [private]

The pay load size.

CORBA::Octet TAO_GIOP_Message_Lite::message_type_ [private]

The message type that we are going to process..

TAO_ORB_Core* TAO_GIOP_Message_Lite::orb_core_ [private]

Our copy of the ORB core...


The documentation for this class was generated from the following files:
Generated on Mon Apr 30 23:03:02 2007 for TAO by  doxygen 1.4.7-1