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

TAO_IIOP_Transport Class Reference

Specialization of the base TAO_Transport class to handle the IIOP protocol. More...

#include <IIOP_Transport.h>

Inheritance diagram for TAO_IIOP_Transport

Inheritance graph
[legend]
Collaboration diagram for TAO_IIOP_Transport:

Collaboration graph
[legend]
List of all members.

Overridden Template Methods

Please check the documentation in "tao/Transport.h" for more details.

virtual int send_request (TAO_Stub *stub, TAO_ORB_Core *orb_core, TAO_OutputCDR &stream, int twoway, ACE_Time_Value *max_wait_time)
 TODO: These methods IMHO should have more meaningful names. The names seem to indicate nothing. More...

virtual int send_message (TAO_OutputCDR &stream, TAO_Stub *stub = 0, int twoway = 1, ACE_Time_Value *max_time_wait = 0)
 This method formats the stream and then sends the message on the transport. More...

virtual int generate_request_header (TAO_Operation_Details &opdetails, TAO_Target_Specification &spec, TAO_OutputCDR &msg)
 This is a request for the transport object to write a request header before it sends out the request.

virtual int messaging_init (CORBA::Octet major, CORBA::Octet minor)
virtual int tear_listen_point_list (TAO_InputCDR &cdr)
 Extracts the list of listen points from the <cdr> stream. The list would have the protocol specific details of the ListenPoints.

virtual ACE_Event_Handlerevent_handler_i (void)
 Return the event handler used to receive notifications from the Reactor. More...

virtual TAO_Pluggable_Messagingmessaging_object (void)
 Access the underlying messaging object.

virtual ssize_t send_i (iovec *iov, int iovcnt, size_t &bytes_transferred, const ACE_Time_Value *timeout = 0)
 Write the complete iovec chain to the connection. More...

virtual ssize_t recv_i (char *buf, size_t len, const ACE_Time_Value *s = 0)
virtual int register_handler_i (void)
 Register the handler with the reactor. More...

virtual void transition_handler_state_i (void)
 Method to do whatever it needs to do when the connection handler is being closed and destroyed.


Public Methods

 TAO_IIOP_Transport (TAO_IIOP_Connection_Handler *handler, TAO_ORB_Core *orb_core, CORBA::Boolean flag)
 Constructor.

 ~TAO_IIOP_Transport (void)
 Default destructor.


Private Methods

void set_bidir_context_info (TAO_Operation_Details &opdetails)
 Set the Bidirectional context info in the service context list.

int get_listen_point (IIOP::ListenPointList &listen_point_list, TAO_Acceptor *acceptor)
 Add the listen points in to the <listen_point_list> if this connection is in the same interface as that of the endpoints in the .


Private Attributes

TAO_IIOP_Connection_Handlerconnection_handler_
 The connection service handler used for accessing lower layer communication protocols.

TAO_Pluggable_Messagingmessaging_object_
 Our messaging object.


Detailed Description

Specialization of the base TAO_Transport class to handle the IIOP protocol.


Constructor & Destructor Documentation

TAO_IIOP_Transport::TAO_IIOP_Transport ( TAO_IIOP_Connection_Handler * handler,
TAO_ORB_Core * orb_core,
CORBA::Boolean flag ) [inline]
 

Constructor.

TAO_IIOP_Transport::~TAO_IIOP_Transport ( void )
 

Default destructor.


Member Function Documentation

ACE_Event_Handler * TAO_IIOP_Transport::event_handler_i ( void ) [protected, virtual]
 

Return the event handler used to receive notifications from the Reactor.

Normally a concrete TAO_Transport object has-a ACE_Event_Handler member that function as an adapter between the ACE_Reactor framework and the TAO pluggable protocol framework. In all the protocols implemented so far this role is fullfilled by an instance of ACE_Svc_Handler.

Todo:
Since we only use a limited functionality of ACE_Svc_Handler we could probably implement a generic adapter class (TAO_Transport_Event_Handler or something), this will reduce footprint and simplify the process of implementing a pluggable protocol.

Reimplemented from TAO_Transport.

int TAO_IIOP_Transport::generate_request_header ( TAO_Operation_Details & opdetails,
TAO_Target_Specification & spec,
TAO_OutputCDR & msg ) [virtual]
 

This is a request for the transport object to write a request header before it sends out the request.

Reimplemented from TAO_Transport.

int TAO_IIOP_Transport::get_listen_point ( IIOP::ListenPointList & listen_point_list,
TAO_Acceptor * acceptor ) [private]
 

Add the listen points in to the <listen_point_list> if this connection is in the same interface as that of the endpoints in the .

int TAO_IIOP_Transport::messaging_init ( CORBA::Octet major,
CORBA::Octet minor ) [virtual]
 

Initialising the messaging object. This would be used by the connector side. On the acceptor side the connection handler would take care of the messaging objects.

Reimplemented from TAO_Transport.

TAO_Pluggable_Messaging * TAO_IIOP_Transport::messaging_object ( void ) [protected, virtual]
 

Access the underlying messaging object.

Reimplemented from TAO_Transport.

ssize_t TAO_IIOP_Transport::recv_i ( char * buf,
size_t len,
const ACE_Time_Value * s = 0 ) [protected, virtual]
 

Parameters:
buffer   ORB allocated buffer where the data should be @ The ACE_Time_Value *s is just a place holder for now. It is not clear this this is the best place to specify this. The actual timeout values will be kept in the Policies.

Reimplemented from TAO_Transport.

int TAO_IIOP_Transport::register_handler_i ( void ) [protected, virtual]
 

Register the handler with the reactor.

This method is used by the Wait_On_Reactor strategy. The transport must register its event handler with the ORB's Reactor.

Todo:
: I think this method is pretty much useless, the connections are *always* registered with the Reactor, except in thread-per-connection mode. In that case putting the connection in the Reactor would produce unpredictable results anyway.

Reimplemented from TAO_Transport.

ssize_t TAO_IIOP_Transport::send_i ( iovec * iov,
int iovcnt,
size_t & bytes_transferred,
const ACE_Time_Value * timeout = 0 ) [protected, virtual]
 

Write the complete iovec chain to the connection.

Often the implementation simply forwards the arguments to the underlying ACE_Svc_Handler class. Using the code factored out into ACE.

Be careful with protocols that perform non-trivial transformations of the data, such as SSLIOP or protocols that compress the stream.

Parameters:
iov   contains the data that must be sent.
iovcnt   is the number of iovec structures in the list where iov points.
bytes_transferred   should return the total number of bytes successfully transferred before the connection blocked. This is required because in some platforms and/or protocols multiple system calls may be required to send the chain of message blocks. The first few calls can work successfully, but the final one can fail or signal a flow control situation (via EAGAIN). In this case the ORB expects the function to return -1, errno to be appropriately set and this argument to return the number of bytes already on the OS I/O subsystem.
timeout   is the maximum time that the application is willing to wait for the data to be sent, useful in platforms that implement timed writes. The timeout value is obtained from the policies set by the application.

Reimplemented from TAO_Transport.

int TAO_IIOP_Transport::send_message ( TAO_OutputCDR & stream,
TAO_Stub * stub = 0,
int twoway = 1,
ACE_Time_Value * max_time_wait = 0 ) [virtual]
 

This method formats the stream and then sends the message on the transport.

Once the ORB is prepared to receive a reply (see send_request() above), and all the arguments have been marshaled the CDR stream must be 'formatted', i.e. the message_size field in the GIOP header can finally be set to the proper value.

Todo:
Another generic method, move to TAO_Transport.

Reimplemented from TAO_Transport.

int TAO_IIOP_Transport::send_request ( TAO_Stub * stub,
TAO_ORB_Core * orb_core,
TAO_OutputCDR & stream,
int twoway,
ACE_Time_Value * max_wait_time ) [virtual]
 

TODO: These methods IMHO should have more meaningful names. The names seem to indicate nothing.

@

Reimplemented from TAO_Transport.

void TAO_IIOP_Transport::set_bidir_context_info ( TAO_Operation_Details & opdetails ) [private]
 

Set the Bidirectional context info in the service context list.

int TAO_IIOP_Transport::tear_listen_point_list ( TAO_InputCDR & cdr ) [virtual]
 

Extracts the list of listen points from the <cdr> stream. The list would have the protocol specific details of the ListenPoints.

Reimplemented from TAO_Transport.

void TAO_IIOP_Transport::transition_handler_state_i ( void ) [protected, virtual]
 

Method to do whatever it needs to do when the connection handler is being closed and destroyed.

Reimplemented from TAO_Transport.


Member Data Documentation

TAO_IIOP_Connection_Handler * TAO_IIOP_Transport::connection_handler_ [private]
 

The connection service handler used for accessing lower layer communication protocols.

TAO_Pluggable_Messaging * TAO_IIOP_Transport::messaging_object_ [private]
 

Our messaging object.


The documentation for this class was generated from the following files:
Generated at Fri Oct 5 08:02:30 2001 for TAO by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000