diff options
Diffstat (limited to 'cpp/src/IcePack/Forward.cpp')
-rw-r--r-- | cpp/src/IcePack/Forward.cpp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/cpp/src/IcePack/Forward.cpp b/cpp/src/IcePack/Forward.cpp new file mode 100644 index 00000000000..ffce65f468f --- /dev/null +++ b/cpp/src/IcePack/Forward.cpp @@ -0,0 +1,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 +} |