summaryrefslogtreecommitdiff
path: root/js/test/Ice/servantLocator/TestActivationI.js
blob: 9a52e7e9c0b34d46bbc7cb93571d1df20bb06ad3 (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
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//

(function(module, require, exports)
{
    const Test = require("Test").Test;
    const ServantLocatorI = require("ServantLocatorI").ServantLocatorI;

    class TestActivationI extends Test.TestActivation
    {
        activateServantLocator(activate, current)
        {
            if(activate)
            {
                current.adapter.addServantLocator(new ServantLocatorI(""), "");
                current.adapter.addServantLocator(new ServantLocatorI("category"), "category");
            }
            else
            {
                let locator = current.adapter.removeServantLocator("");
                locator.deactivate("");
                locator = current.adapter.removeServantLocator("category");
                locator.deactivate("category");
            }
        }
    }

    exports.TestActivationI = TestActivationI;
}(typeof global !== "undefined" && typeof global.process !== "undefined" ? module : undefined,
  typeof global !== "undefined" && typeof global.process !== "undefined" ? require :
  (typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope) ? self.Ice._require : window.Ice._require,
  typeof global !== "undefined" && typeof global.process !== "undefined" ? exports :
  (typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope) ? self : window));