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

TAO_Notify_Handler Class Reference

Represents the handler used by the notify calls to the reactor within the ORB. More...

#include <Notify_Handler.h>

Inheritance diagram for TAO_Notify_Handler:

Inheritance graph
[legend]
Collaboration diagram for TAO_Notify_Handler:

Collaboration graph
[legend]
List of all members.

Public Methods

 ~TAO_Notify_Handler (void)
 Dtor. More...

virtual int handle_input (ACE_HANDLE fd)
 The standard handle_input method, it just redirects to the connection handler. More...

virtual int handle_close (ACE_HANDLE fd, ACE_Reactor_Mask close_mask)

Static Public Methods

TAO_Notify_Handler * create_handler (TAO_Connection_Handler *ch, ACE_Allocator *alloc)
 NOTE: Needs to be deprecated. Just here for backward compatibility. More...

TAO_Notify_Handler * create_handler (TAO_Transport *t, ACE_HANDLE h, ACE_Allocator *alloc)
 Static method to create an instance of this object in the memory pool. More...

void destroy_handler (TAO_Notify_Handler *nh)
 Static method to destroy an instance of this object. More...


Protected Methods

 TAO_Notify_Handler (TAO_Connection_Handler *ch, ACE_Allocator *alloc)
 NOTE: Needs to be deprecated. More...

 TAO_Notify_Handler (TAO_Transport *t, ACE_HANDLE h, ACE_Allocator *alloc)
 Ctor. More...


Private Methods

 TAO_Notify_Handler (void)
 Preventing default ctor's. More...


Private Attributes

TAO_Transportt_
 Our copy of the TAO_TRansport, reference count incremented and stored. More...

ACE_HANDLE h_
 The handle that we should be concerened with. More...

ACE_Allocatorallocator_
 Our allocator. More...


Detailed Description

Represents the handler used by the notify calls to the reactor within the ORB.

Cluttering the *IOP handlers with the job of handling notify calls introduces problems as mentioned in [BUG 1230]. This special handler can help to avoid that problem by splitting the responsibilities between actual connection handling and notify handling that is done underneath the ORB.

Definition at line 41 of file Notify_Handler.h.


Constructor & Destructor Documentation

TAO_Notify_Handler::~TAO_Notify_Handler void   
 

Dtor.

Definition at line 37 of file Notify_Handler.cpp.

References TAO_Transport::release.

00038 {
00039   TAO_Transport::release (this->t_);
00040 }

TAO_Notify_Handler::TAO_Notify_Handler TAO_Connection_Handler   ch,
ACE_Allocator   alloc
[protected]
 

NOTE: Needs to be deprecated.

Definition at line 24 of file Notify_Handler.cpp.

References ACE_ASSERT.

00026  : ACE_Event_Handler (ch->transport ()->orb_core ()->reactor ()),
00027    // REFCNT: Matches with Notify_Handler::~Notify_Handler()
00028    t_ (ch->transport ()),
00029    h_ (ACE_INVALID_HANDLE),
00030    allocator_ (alloc)
00031 {
00032   // This constructor should *never* get called, it is just here to
00033   // for backward comptibility.
00034   ACE_ASSERT (ch == 0);
00035 }

TAO_Notify_Handler::TAO_Notify_Handler TAO_Transport   t,
ACE_HANDLE    h,
ACE_Allocator   alloc
[protected]
 

Ctor.

Definition at line 13 of file Notify_Handler.cpp.

00016   : ACE_Event_Handler (t->orb_core ()->reactor ()),
00017     // REFCNT: Matches with Notify_Handler::~Notify_Handler()
00018     t_ (TAO_Transport::_duplicate (t)),
00019     h_ (h),
00020     allocator_ (alloc)
00021 {
00022 }

TAO_Notify_Handler::TAO_Notify_Handler void    [private]
 

Preventing default ctor's.

Referenced by create_handler.


Member Function Documentation

TAO_Notify_Handler * TAO_Notify_Handler::create_handler TAO_Transport   t,
ACE_HANDLE    h,
ACE_Allocator   alloc
[static]
 

Static method to create an instance of this object in the memory pool.

Definition at line 51 of file Notify_Handler.cpp.

References ACE_NEW_MALLOC_RETURN, ACE_Allocator::malloc, and TAO_Notify_Handler.

00054 {
00055   TAO_Notify_Handler *nh = 0;
00056 
00057   if (alloc)
00058     {
00059       ACE_NEW_MALLOC_RETURN (nh,
00060                              ACE_static_cast (
00061                                  TAO_Notify_Handler *,
00062                                  alloc->malloc (sizeof (TAO_Notify_Handler))),
00063                              TAO_Notify_Handler (t,
00064                                                  h,
00065                                                  alloc),
00066                              0);
00067 
00068       return nh;
00069     }
00070 
00071   return 0;
00072 }

TAO_Notify_Handler * TAO_Notify_Handler::create_handler TAO_Connection_Handler   ch,
ACE_Allocator   alloc
[static]
 

NOTE: Needs to be deprecated. Just here for backward compatibility.

Definition at line 44 of file Notify_Handler.cpp.

Referenced by TAO_Transport::notify_reactor.

00046 {
00047   return 0;
00048 }

void TAO_Notify_Handler::destroy_handler TAO_Notify_Handler *    nh [static]
 

Static method to destroy an instance of this object.

Definition at line 76 of file Notify_Handler.cpp.

References ACE_DES_FREE, allocator_, and ACE_Allocator::free.

Referenced by handle_close.

00077 {
00078   if (nh->allocator_)
00079     {
00080       ACE_DES_FREE (nh,
00081                     nh->allocator_->free,
00082                     TAO_Notify_Handler);
00083     }
00084 
00085   return;
00086 }

int TAO_Notify_Handler::handle_close ACE_HANDLE    fd,
ACE_Reactor_Mask    close_mask
[virtual]
 

Reimplemented from ACE_Event_Handler.

Definition at line 112 of file Notify_Handler.cpp.

References ACE_Reactor_Mask, and destroy_handler.

00114 {
00115   TAO_Notify_Handler::destroy_handler (this);
00116   return 0;
00117 }

int TAO_Notify_Handler::handle_input ACE_HANDLE    fd [virtual]
 

The standard handle_input method, it just redirects to the connection handler.

Reimplemented from ACE_Event_Handler.

Definition at line 90 of file Notify_Handler.cpp.

References h_, TAO_Transport::handle_input_i, t_, and TAO_Transport::update_transport.

00091 {
00092   // NOTE: We will do what the Connection_Handler will do with some
00093   // exceptions though.. Quite a few things done are not required
00094   // by the Notify_Handler at all.
00095 
00096   // Let the transport know that it is used
00097   (void) this->t_->update_transport ();
00098 
00099   TAO_Resume_Handle resume_handle (this->t_->orb_core (),
00100                                    this->h_);
00101 
00102   // Does return value matter? Not is my opinion.
00103   (void) this->t_->handle_input_i (resume_handle);
00104 
00105   // Yes, we are wantedly returning this so that handle_close () would
00106   // be called
00107   return -1;
00108 }


Member Data Documentation

ACE_Allocator* TAO_Notify_Handler::allocator_ [private]
 

Our allocator.

Definition at line 93 of file Notify_Handler.h.

Referenced by destroy_handler.

ACE_HANDLE TAO_Notify_Handler::h_ [private]
 

The handle that we should be concerened with.

Definition at line 90 of file Notify_Handler.h.

Referenced by handle_input.

TAO_Transport* TAO_Notify_Handler::t_ [private]
 

Our copy of the TAO_TRansport, reference count incremented and stored.

Definition at line 87 of file Notify_Handler.h.

Referenced by handle_input.


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