00001
00002
00003 #include "orbsvcs/PortableGroup/UIPMC_Profile.h"
00004 #include "orbsvcs/PortableGroup/PortableGroup_Request_Dispatcher.h"
00005 #include "orbsvcs/PortableGroup/PortableGroup_Loader.h"
00006
00007 #include "tao/TAO_Server_Request.h"
00008 #include "tao/ORB_Core.h"
00009
00010 ACE_RCSID (PortableGroup,
00011 PortableGroup_Request_Dispatcher,
00012 "PortableGroup_Request_Dispatcher.cpp,v 1.10 2006/03/14 06:14:34 jtc Exp")
00013
00014 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00015
00016 PortableGroup_Request_Dispatcher::~PortableGroup_Request_Dispatcher (void)
00017 {
00018 }
00019
00020 void
00021 PortableGroup_Request_Dispatcher::dispatch (TAO_ORB_Core *orb_core,
00022 TAO_ServerRequest &request,
00023 CORBA::Object_out forward_to
00024 ACE_ENV_ARG_DECL)
00025 {
00026
00027 if (request.profile ().discriminator () == GIOP::ProfileAddr)
00028 {
00029
00030 const IOP::TaggedProfile &tagged_profile =
00031 request.profile ().tagged_profile ();
00032 PortableGroup::TagGroupTaggedComponent group;
00033
00034
00035 int result = TAO_UIPMC_Profile::extract_group_component (tagged_profile,
00036 group);
00037 if (result == 0)
00038 {
00039
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
00051 }
00052
00053
00054 orb_core->adapter_registry ()->dispatch (request.object_key (),
00055 request,
00056 forward_to
00057 ACE_ENV_ARG_PARAMETER);
00058 ACE_CHECK;
00059 }
00060
00061 TAO_END_VERSIONED_NAMESPACE_DECL