summaryrefslogtreecommitdiff
path: root/TAO/tao/PortableServer/ImplRepo.pidl
blob: 4ab5392258a1db7be45477f241785f04a6a92f4d (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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
// -*- IDL -*-

//=============================================================================
/**
 *  @file   ImplRepo.pidl
 *
 * $Id$
 *
 * This file was used to generate the code in ImplRepo{C,S,S_T}.{h,i,cpp}
 *
 * The command used to generate code from this file is:
 *
 *   tao_idl.exe
 *        -o orig -Gp -Gd -Ge 1 -GT
 *        -Wb,export_macro=TAO_PortableServer_Export
 *        -Wb,export_include=portableserver_export.h
 *        -Wb,pre_include="ace/pre.h"
 *        -Wb,post_include="ace/post.h"
 *        ImplRepo.pidl
 *
 * after the file is generated a patch must be applied. T he patch
 * disables the code under certain configurations, and eliminates
 * cycles in the include dependencies.
 * Those changes are required because the generated code is part of
 * the TAO library, it hardly makes any sense to change the IDL
 * compiler to support changes that are very occasional.
 *
 */
//=============================================================================

module ImplementationRepository
{
  interface ServerObject
    // = TITLE
    //    Server Side IR Object
    //
    // = DESCRIPTION
    //    This object, which exists on the servers that use the
    //    Implementation Repository (IR), is used to control or check the
    //    status of the server by the IR.
  {
    void ping ();
    // Check the liveness of a server.

    void shutdown ();
    // Try to shutdown the server gracefully.
  };

  // = Exceptions
  
  exception AlreadyRegistered {};
  // Object already bound in the Implementation Repository
  
  exception CannotActivate
  {
    string reason;
  };
  // The server could not be restarted.
  
  exception NotFound {};
  // Object not found in the Implementation Repository
  
  struct EnvironmentVariable
  // One environment variable/value pair.
  {
    string name;
    string value;
  };
  
  typedef string Address;
  // Specifies the location of the server.

  typedef sequence<EnvironmentVariable> EnvironmentList;
  // Complete Environment.

  enum ActivationMode {NORMAL, MANUAL, PER_CLIENT, AUTO_START};
  // The type of Activation

  /// Options used to start up the server.
  struct StartupOptions
  {
    /// Startup command (program name and arguments).
    string command_line;
    
    /// Environment Variables.
    EnvironmentList environment;
    
    /// Working directory.
    string working_directory;
    
    /// Activation Mode
    ActivationMode activation;

    /// Location of the activator
    string location;
  };

  struct ServerInformation
  // All the information about one server.
  {
    /// The logical server this server is part of.
    string logical_server;

    /// Server name.
    string server;
    
    /// How to start up the server.
    StartupOptions startup;
    
    /// Where the server is located currently.
    Address location;
   
  };

  typedef sequence <ServerInformation> ServerInformationList;

  /// Forward declaration.
  interface ServerInformationIterator;


  interface Administration
    // = TITLE
    //    The Implementation Repository Administration Interface
    //
    // = DESCRIPTION
    //    This interface exports all the administration functionality of
    //    the Implementation Repository.
  {
    void activate_server (in string server)
      raises (NotFound,
              CannotActivate);
    // Activate server that is named <server>.
    //
    // The <NotFound> exception is raised when <server> is not found
    // in the Implementation Repository.  The <CannotActivate> exception
    // is raised when <server> is found in the Repository but could not be
    // activated.

    string activate_server_with_startup (in string server,
					 in long check_startup)
      raises (NotFound,
              CannotActivate);

    void register_server (in string server,
                          in StartupOptions options)
      raises (AlreadyRegistered);
    // Register the <options> to specify how the <server> should be
    // restarted when a client asks for it.
    //
    // The <AlreadyRegistered> exception is raised when <server> has
    // already been registered with the Implementation Repository.

    void reregister_server (in string server,
                            in StartupOptions options);
    // Update the <options> to specify how the <server> should be
    // restarted when a client asks for it.  Will register the server
    // if not already registered.

    void remove_server (in string server)
      raises (NotFound);
    // Remove <server> from the Implementation Repository.
    //
    // The <NotFound> exception is raised when <server> is not found
    // in the Implementation Repository.

    void shutdown_server (in string server)
      raises (NotFound);
    // Tries to shutdown the server, first gracefully, then ungracefully.
    //
    // The <NotFound> exception is raised when <server> is not found
    // in the Implementation Repository.
    
    Address server_is_running (in string server,
                               in Address addr,
                               in ServerObject server_object)
      raises (NotFound);
    // Used to notify the Implementation Repository that <server> is alive
    // and well at <addr>.
    //
    // The <NotFound> exception is raised when <server> is not found
    // in the Implementation Repository.
    
    void server_is_shutting_down (in string server)
      raises (NotFound);
    // Used to tell the Implementation Repository that <server> is shutting
    // down.
    //
    // The <NotFound> exception is raised when <server> is not found
    // in the Implementation Repository.

    void find (in string server,
               out ServerInformation info)
      raises (NotFound);
    // Returns the startup information for a given <server>.
    //
    // The <NotFound> exception is raised when <server> is not found
    // in the Implementation Repository.

    void list (in unsigned long how_many,
               out ServerInformationList server_list,
               out ServerInformationIterator server_iterator);
    // Returns at most <how_many> servers in <server_list>.  If there
    // are additional servers, they can be received through the
    // <server_iterator>.  If there are no more servers, then
    // <server_iterator> is null.
  };

  interface ServerInformationIterator
  {
    // = TITLE
    // Interface for iterating over servers returned with
    // Administration::list ().

    boolean next_n (in unsigned long how_many,
                    out ServerInformationList server_list);
    // This operation returns at most the requested number of
    // servers.

    void destroy ();
    // This operation destroys the iterator.
  };
};