summaryrefslogtreecommitdiff
path: root/cpp/src/IcePack/ServerManager.ice
blob: 190d59baec0dee43235d8e79f0000661a1a059ef (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
// **********************************************************************
//
// Copyright (c) 2001
// Mutable Realms, Inc.
// Huntsville, AL, USA
//
// All Rights Reserved
//
// **********************************************************************

#ifndef ICE_PACK_SERVER_MANAGER_ICE
#define ICE_PACK_SERVER_MANAGER_ICE

#include <IcePack/Admin.ice>
#include <IcePack/AdapterManager.ice>

module IcePack
{

class Server
{
    /**
     *
     * Server description.
     *
     * @return The server description.
     *
     **/
    ServerDescription getServerDescription();

    /**
     *
     * Start the server.
     *
     * @return True if the server was successfully started, false
     * otherwise.
     *
     **/
    bool start();

    /**
     *
     * This method is called by the activator when it detects that the
     * server has terminated.
     *
     **/
    void terminationCallback();
    
    /**
     *
     * Return the server state.
     *
     **/
    ServerState getState();

    /**
     * 
     * The description of this server.
     *
     */
    ServerDescription _description;

    /**
     *
     * The server state.
     *
     */    
    ServerState _state;

    /**
     *
     * The adapter proxies.
     *
     **/
    Adapters _adapters;
};

class ServerManager
{
    /**
     *
     * Create a server.
     *
     **/
    Server* create(ServerDescription description)
	throws ServerExistsException, AdapterExistsException;

    /**
     *
     * Find an adapter and return its proxy.
     *
     * @param name Name of the adapter.
     *
     * @return Server proxy.
     *
     **/
     Server* findByName(string name);

    /**
     *
     * Remove a server.
     *
     **/
    void remove(string name)
	throws ServerNotExistException, ServerNotInactiveException;
    
    /**
     *
     * Get all server names.
     *
     **/
    ServerNames getAll();
};

};

#endif