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 TAO_ORB_Core::adapter_registry(), TAO_Tagged_Profile::discriminator(), TAO_Adapter_Registry::dispatch(), TAO_Portable_Group_Map::dispatch(), TAO_UIPMC_Profile::extract_group_component(), group_map_, TAO_ServerRequest::object_key(), TAO_ServerRequest::profile(), and TAO_Tagged_Profile::tagged_profile().

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


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 61 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 58 of file PortableGroup_Request_Dispatcher.h.

Referenced by TAO_GOA::associate_group_with_ref(), and dispatch().


The documentation for this class was generated from the following files:
Generated on Tue Feb 2 17:49:59 2010 for TAO_PortableGroup by  doxygen 1.4.7