blob: 4e2c4c5dfe6c1c2f2ba76619cf0d8e7a83d77980 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
#include "orbsvcs/PortableGroup/UIPMC_Profile.h"
#include "orbsvcs/PortableGroup/PortableGroup_Request_Dispatcher.h"
#include "orbsvcs/PortableGroup/PortableGroup_Loader.h"
#include "tao/TAO_Server_Request.h"
#include "tao/ORB_Core.h"
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
PortableGroup_Request_Dispatcher::~PortableGroup_Request_Dispatcher ()
{
}
void
PortableGroup_Request_Dispatcher::dispatch (TAO_ORB_Core *orb_core,
TAO_ServerRequest &request,
CORBA::Object_out forward_to)
{
// Check if the request contains a tagged profile
if (request.profile ().discriminator () == GIOP::ProfileAddr)
{
// Get the IOP::Tagged profile.
const IOP::TaggedProfile &tagged_profile =
request.profile ().tagged_profile ();
PortableGroup::TagGroupTaggedComponent group;
// Extract a Group ID from the profile if it exists.
int result = TAO_UIPMC_Profile::extract_group_component (tagged_profile,
group);
if (result == 0)
{
// Got a group. Dispatch based on the group ID
this->group_map_.dispatch (&group,
orb_core,
request,
forward_to);
return;
}
// Else, fall through and dispatch based on object key like normal.
}
// Dispatch based on object key.
orb_core->adapter_registry ().dispatch (request.object_key (),
request,
forward_to);
}
TAO_END_VERSIONED_NAMESPACE_DECL
|