channel::ConnHandler< Channel, Transport > Class Template Reference

#include <ConnHandler.h>

List of all members.

Public Types

typedef Channel::IdType IdType
typedef Channel::IdTrait IdTrait
typedef Channel::Msg Msg
typedef Connector< Channel,
Transport > 
Connector
typedef ConnHandler< Channel,
Transport > 
ConnHandlerType
typedef RemoteInterface< Channel,
Transport > 
RemoteInterface

Public Member Functions

 ConnHandler ()
virtual ~ConnHandler ()
virtual ACE_SOCK_Stream & peer_stream (void)=0
virtual void shut_down (void)=0
int set_up (Connector *c, Interface_Role r)
 setup framework with RemoteInterface, Connector and Channel
int service (void)
 main func to handler thread
Status handle_message (Msg *msg)
int recv_message (Msg *&msg)
 read from connection & demarshal data
int send_msg (Msg *msg)
 marshal data & write outgoing msgs

Public Attributes

Connectorcm_
ConnInfo rmt_addr_
RemoteInterfaceintf_


Detailed Description

template<class Channel, class Transport>
class channel::ConnHandler< Channel, Transport >

ConnHandler<Channel, Transport> is a key class to set up the framework of Connector-ConnHandler-RemoteInterface it is the parent class of all concrete Connection handlers classes such as TcpSockConnHandler and UnixSockConnHandler implement the common functions: main thread loop, send_msg(marshaling) recv_msg (demarshaling)

Definition at line 37 of file ConnHandler.h.


Member Typedef Documentation

template<class Channel, class Transport>
typedef Connector<Channel, Transport> channel::ConnHandler< Channel, Transport >::Connector
 

Definition at line 42 of file ConnHandler.h.

template<class Channel, class Transport>
typedef ConnHandler<Channel, Transport> channel::ConnHandler< Channel, Transport >::ConnHandlerType
 

Definition at line 43 of file ConnHandler.h.

template<class Channel, class Transport>
typedef Channel::IdTrait channel::ConnHandler< Channel, Transport >::IdTrait
 

Definition at line 40 of file ConnHandler.h.

template<class Channel, class Transport>
typedef Channel::IdType channel::ConnHandler< Channel, Transport >::IdType
 

Definition at line 39 of file ConnHandler.h.

template<class Channel, class Transport>
typedef Channel::Msg channel::ConnHandler< Channel, Transport >::Msg
 

Definition at line 41 of file ConnHandler.h.

template<class Channel, class Transport>
typedef RemoteInterface<Channel, Transport> channel::ConnHandler< Channel, Transport >::RemoteInterface
 

Definition at line 44 of file ConnHandler.h.


Constructor & Destructor Documentation

template<class Channel, class Transport>
channel::ConnHandler< Channel, Transport >::ConnHandler  )  [inline]
 

Definition at line 50 of file ConnHandler.h.

template<class Channel, class Transport>
virtual channel::ConnHandler< Channel, Transport >::~ConnHandler  )  [inline, virtual]
 

Definition at line 52 of file ConnHandler.h.


Member Function Documentation

template<class Channel, class Transport>
Status channel::ConnHandler< Channel, Transport >::handle_message Msg msg  )  [inline]
 

Definition at line 109 of file ConnHandler.h.

Referenced by channel::ConnHandler< Channel, TcpSockTransport< Channel > >::service().

template<class Channel, class Transport>
virtual ACE_SOCK_Stream& channel::ConnHandler< Channel, Transport >::peer_stream void   )  [pure virtual]
 

the interface to remote peer, need more generic interface when connections are not tcp_sock or unix_sock

Implemented in channel::Tcp_ConnHandler< Channel >, and channel::Unix_ConnHandler< Channel >.

template<class Channel, class Transport>
int channel::ConnHandler< Channel, Transport >::recv_message Msg *&  msg  )  [inline]
 

read from connection & demarshal data

Definition at line 115 of file ConnHandler.h.

Referenced by channel::ConnHandler< Channel, TcpSockTransport< Channel > >::service().

template<class Channel, class Transport>
int channel::ConnHandler< Channel, Transport >::send_msg Msg msg  )  [inline]
 

marshal data & write outgoing msgs

Definition at line 189 of file ConnHandler.h.

Referenced by channel::OutputMgr< Channel, ConnHandler >::send().

template<class Channel, class Transport>
int channel::ConnHandler< Channel, Transport >::service void   )  [inline]
 

main func to handler thread

Definition at line 79 of file ConnHandler.h.

template<class Channel, class Transport>
int channel::ConnHandler< Channel, Transport >::set_up Connector c,
Interface_Role  r
[inline]
 

setup framework with RemoteInterface, Connector and Channel

Definition at line 59 of file ConnHandler.h.

template<class Channel, class Transport>
virtual void channel::ConnHandler< Channel, Transport >::shut_down void   )  [pure virtual]
 

Implemented in channel::Tcp_ConnHandler< Channel >, and channel::Unix_ConnHandler< Channel >.


Member Data Documentation

template<class Channel, class Transport>
Connector* channel::ConnHandler< Channel, Transport >::cm_
 

Definition at line 46 of file ConnHandler.h.

Referenced by channel::ConnHandler< Channel, TcpSockTransport< Channel > >::service(), and channel::ConnHandler< Channel, TcpSockTransport< Channel > >::set_up().

template<class Channel, class Transport>
RemoteInterface* channel::ConnHandler< Channel, Transport >::intf_
 

Definition at line 48 of file ConnHandler.h.

Referenced by channel::RemoteInterface< Channel, Transport >::RemoteInterface(), channel::ConnHandler< Channel, TcpSockTransport< Channel > >::service(), and channel::ConnHandler< Channel, TcpSockTransport< Channel > >::set_up().

template<class Channel, class Transport>
ConnInfo channel::ConnHandler< Channel, Transport >::rmt_addr_
 

Definition at line 47 of file ConnHandler.h.

Referenced by channel::Connector< Channel, TcpSockTransport< Channel > >::connect(), channel::ConnHandler< Channel, TcpSockTransport< Channel > >::service(), and channel::ConnHandler< Channel, TcpSockTransport< Channel > >::set_up().


The documentation for this class was generated from the following file:
Generated on Mon Feb 27 19:59:23 2006 for channel by  doxygen 1.4.6-NO