summaryrefslogtreecommitdiff
path: root/TAO/tao/ImR_Client/ImplRepo.pidl
blob: 16d8eb4dd200908c07af0f1e19e261fae851b6f0 (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
// -*- IDL -*-

//=============================================================================
/**
 *  @file   ImplRepo.pidl
 *
 * $Id$
 *
 * This file was used to generate the code in ImplRepo{C,S}.{h,inl,cpp}
 *
 * The command used to generate code from this file is:
 *
 *   tao_idl -Ssi -Gp -Gd -Ge 1 -Sc -Wb,export_macro=TAO_IMR_Client_Export -Wb,export_include=imr_client_export.h -Wb,pre_include="ace/pre.h" -Wb,post_include="ace/post.h" ImplRepo.pidl
 *
 */
//=============================================================================

#include "ServerObject.pidl"

module ImplementationRepository
{
  // = Exceptions

  /// Object already bound in the Implementation Repository
  exception AlreadyRegistered {};

  /// The server could not be restarted.
  exception CannotActivate
  {
    string reason;
  };

  /// Object not found in the Implementation Repository
  exception NotFound {};

  /// One environment variable/value pair.
  struct EnvironmentVariable
  {
    string name;
    string value;
  };

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

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

  /// 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;

    /// Name of the activator
    string activator;

    /// Number of retries allowed
    long start_limit;
  };

  struct ServerInformation
  {
    /// Server name.
    string server;

    /// How to start up the server.
    StartupOptions startup;

    /// This is used in places that require a partial IOR with
    /// just the ObjectKey missing.
    string partial_ior;
  };

  typedef sequence <ServerInformation> ServerInformationList;

  /**
    * @brief The Server Information Iterator Interface
    *
    * Interface for iterating over servers returned with
    * Administration::list ().
    */
  interface ServerInformationIterator
  {
    /// This operation returns at most the requested number of
    /// servers.
    /// If how_many == 0, then returns all servers
    boolean next_n (in unsigned long how_many,
                    out ServerInformationList servers);

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

  /**
    * @brief The Implementation Repository Administration Interface
    *
    * This interface exports all the administration functionality of
    * the Implementation Repository.
    */
  interface Administration
  {
    /// 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.
    void activate_server (in string server)
      raises (NotFound, CannotActivate);

    /// Add/Update the the <server> 
    /// The <NotFound> exception is raised when the activator specified
    /// in the options is not registered.
    void add_or_update_server (in string server, in StartupOptions options)
      raises(NotFound);

    /// Remove <server> from the Implementation Repository.
    ///
    /// The <NotFound> exception is raised when <server> is not found
    /// in the Implementation Repository.
    void remove_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.
    void shutdown_server (in string server)
      raises (NotFound);

    /// Used to notify the Implementation Repository that <server> is alive
    /// and well at <partial_ior>.
    ///
    /// The <NotFound> exception is raised when <server> is not found
    /// in the Implementation Repository.
    void server_is_running (in string server,
                            in string partial_ior,
                            in ServerObject server_object)
      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 server_is_shutting_down (in string server)
      raises (NotFound);

    /// Returns the startup information for a given <server>.
    void find (in string server, out ServerInformation info);

    /// 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.
    /// If how_many == 0, then returns all servers.
    void list (in unsigned long how_many,
               out ServerInformationList server_list,
               out ServerInformationIterator server_iterator);

    /// Shutdown the ImR, optionally shutting down registered
    /// activators and servers first.
    oneway void shutdown(in boolean activators, in boolean servers);
  };
};