implrepo.pidl

来自「这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用」· PIDL 代码 · 共 219 行

PIDL
219
字号
// -*- IDL -*-

//=============================================================================
/**
 *  @file   ImplRepo.pidl
 *
 * ImplRepo.pidl,v 1.6 2003/11/10 17:45:16 michel_j Exp
 *
 * 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 -Gp -Gd -Ge 1 -Sc -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
 *
 */
//=============================================================================

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;
  // This is used in places that require a partial IOR with
  // just the ObjectKey missing. 

  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;

    /// Name of the activator
    string activator;
  };

  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, NotFound);
    // 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.
    // The <NotFound> exception is raised when the activator specified
    // in the options is not registered.

    void reregister_server (in string server,
                            in StartupOptions options)
                            raises(AlreadyRegistered, NotFound);
    // 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.
    // The <AlreadyRegistered> exception is raised when <server> has
    // already been registered with a different activator.
    // The <NotFound> exception is raised when the activator specified
    // in the options is not 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.
    
    void 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.

    string find_ior (in string object_name)
      raises (NotFound);

  };

  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.
  };
};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?