summaryrefslogtreecommitdiff
path: root/cpp/src/Glacier2/ServerBlobject.cpp
blob: ee57fcba7bb6857acdfaea19c9c8eec3517573e8 (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
// **********************************************************************
//
// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************

#include <Ice/RoutingTable.h>
#include <Glacier2/ServerBlobject.h>

using namespace std;
using namespace Ice;
using namespace Glacier2;

Glacier2::ServerBlobject::ServerBlobject(const CommunicatorPtr& communicator, const ConnectionPtr& connection) :
    Glacier2::Blobject(communicator, true),
    _connection(connection)
{
}

Glacier2::ServerBlobject::~ServerBlobject()
{
    assert(!_connection);
}

void
Glacier2::ServerBlobject::destroy()
{
    assert(_connection); // Destroyed?
    _connection = 0;
    Blobject::destroy();
}

void
Glacier2::ServerBlobject::ice_invoke_async(const Ice::AMD_Object_ice_invokePtr& amdCB, const ByteSeq& inParams,
					   const Current& current)
{
    assert(_connection); // Destroyed?

    ObjectPrx proxy = _connection->createProxy(current.id);
    assert(proxy);

    invoke(proxy, amdCB, inParams, current);
}