PortableGroup_Request_Dispatcher Class Reference

A class that strategizes the request dispatching procedure. More...

#include <PortableGroup_Request_Dispatcher.h>

Inheritance diagram for PortableGroup_Request_Dispatcher:

Inheritance graph
[legend]
Collaboration diagram for PortableGroup_Request_Dispatcher:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual ~PortableGroup_Request_Dispatcher (void)
 Destructor.

virtual void dispatch (TAO_ORB_Core *orb_core, TAO_ServerRequest &request, CORBA::Object_out forward_to)

Private Attributes

TAO_Portable_Group_Map group_map_
 Hash map containing the GroupId->ObjectKey mappings.

TAO_PortableGroup_Acceptor_Registry acceptor_registry_
 Registry for all of the group (multicast) acceptors.


Friends

class TAO_GOA

Detailed Description

A class that strategizes the request dispatching procedure.

Definition at line 38 of file PortableGroup_Request_Dispatcher.h.


Constructor & Destructor Documentation

TAO_BEGIN_VERSIONED_NAMESPACE_DECL PortableGroup_Request_Dispatcher::~PortableGroup_Request_Dispatcher void   )  [virtual]
 

Destructor.

Definition at line 16 of file PortableGroup_Request_Dispatcher.cpp.

00017 {
00018 }


Member Function Documentation

void PortableGroup_Request_Dispatcher::dispatch TAO_ORB_Core orb_core,
TAO_ServerRequest request,
CORBA::Object_out  forward_to
[virtual]
 

Dispatch a request.

Reimplemented from TAO_Request_Dispatcher.

Definition at line 21 of file PortableGroup_Request_Dispatcher.cpp.

References ACE_CHECK, ACE_ENV_ARG_PARAMETER, TAO_ORB_Core::adapter_registry(), TAO_Tagged_Profile::discriminator(), TAO_Adapter_Registry::dispatch(), TAO_Portable_Group_Map::dispatch(), TAO_UIPMC_Profile::extract_group_component(), TAO_ServerRequest::object_key(), TAO_ServerRequest::profile(), and TAO_Tagged_Profile::tagged_profile().

00025 {
00026   // Check if the request contains a tagged profile
00027   if (request.profile ().discriminator () == GIOP::ProfileAddr)
00028     {
00029       // Get the IOP::Tagged profile.
00030       const IOP::TaggedProfile &tagged_profile =
00031         request.profile ().tagged_profile ();
00032       PortableGroup::TagGroupTaggedComponent group;
00033 
00034       // Extract a Group ID from the profile if it exists.
00035       int result = TAO_UIPMC_Profile::extract_group_component (tagged_profile,
00036                                                                group);
00037       if (result == 0)
00038         {
00039           // Got a group.  Dispatch based on the group ID
00040           this->group_map_.dispatch (&group,
00041                                      orb_core,
00042                                      request,
00043                                      forward_to
00044                                      ACE_ENV_ARG_PARAMETER);
00045           ACE_CHECK;
00046 
00047           return;
00048         }
00049 
00050       // Else, fall through and dispatch based on object key like normal.
00051     }
00052 
00053   // Dispatch based on object key.
00054   orb_core->adapter_registry ()->dispatch (request.object_key (),
00055                                            request,
00056                                            forward_to
00057                                            ACE_ENV_ARG_PARAMETER);
00058   ACE_CHECK;
00059 }


Friends And Related Function Documentation

friend class TAO_GOA [friend]
 

Definition at line 41 of file PortableGroup_Request_Dispatcher.h.


Member Data Documentation

TAO_PortableGroup_Acceptor_Registry PortableGroup_Request_Dispatcher::acceptor_registry_ [private]
 

Registry for all of the group (multicast) acceptors.

Definition at line 62 of file PortableGroup_Request_Dispatcher.h.

Referenced by TAO_GOA::associate_group_with_ref().

TAO_Portable_Group_Map PortableGroup_Request_Dispatcher::group_map_ [private]
 

Hash map containing the GroupId->ObjectKey mappings.

Definition at line 59 of file PortableGroup_Request_Dispatcher.h.

Referenced by TAO_GOA::associate_group_with_ref().


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 14:04:50 2006 for TAO_PortableGroup by doxygen 1.3.6