summaryrefslogtreecommitdiff
path: root/cpp/src/IcePack/Forward.cpp
blob: ffce65f468f68fad718d718861a5cc6698b3674a (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
// **********************************************************************
//
// Copyright (c) 2001
// MutableRealms, Inc.
// Huntsville, AL, USA
//
// All Rights Reserved
//
// **********************************************************************

#include <Ice/Ice.h>
#include <Forward.h>

using namespace std;
using namespace Ice;
using namespace IcePack;

Forward::Forward(const AdminPtr& admin) :
    _admin(admin)
{
}

ObjectPtr
Forward::locate(const ObjectAdapterPtr& adapter, const string& identity, ObjectPtr&)
{
    ObjectPrx proxy = adapter->identityToProxy(identity);
    ServerDescriptionPtr desc = _admin->find(proxy);
    if (desc)
    {
	assert(desc->object);
	throw LocationForward(proxy);
    }
    return 0;
}

void
Forward::finished(const ObjectAdapterPtr&, const string&, const ObjectPtr&, const ObjectPtr&)
{
    // Nothing to do
}