summaryrefslogtreecommitdiff
path: root/csharp/test/Ice/adapterDeactivation/TestI.cs
blob: 8628c7300a49a47a1d07b4d83fe999eedfe758d5 (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
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//

namespace Ice
{
    namespace adapterDeactivation
    {
        public sealed class TestI : Test.TestIntfDisp_
        {
            public override void transient(Ice.Current current)
            {
                Ice.Communicator communicator = current.adapter.getCommunicator();

                Ice.ObjectAdapter adapter = communicator.createObjectAdapterWithEndpoints("TransientTestAdapter", "default");
                adapter.activate();
                adapter.destroy();
            }

            public override void deactivate(Ice.Current current)
            {
                current.adapter.deactivate();
                System.Threading.Thread.Sleep(100);
            }
        }
    }
}