00001 // -*- IDL -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file ImplRepo.pidl 00006 * 00007 * $Id: ImplRepo.pidl 88803 2010-02-02 11:13:27Z vzykov $ 00008 * 00009 * This file is used to generate the code in ImplRepo{A,C,S}.{h,inl,cpp} 00010 * 00011 * The command used to generate code from this file is: 00012 * 00013 * tao_idl -Ssi -Gp -Gd -I$(TAO_ROOT) -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 00014 * 00015 */ 00016 //============================================================================= 00017 00018 #ifndef TAO_IMRCLIENT_IMPLREPO_PIDL 00019 #define TAO_IMRCLIENT_IMPLREPO_PIDL 00020 00021 #include "tao/ImR_Client/ServerObject.pidl" 00022 00023 module ImplementationRepository 00024 { 00025 // = Exceptions 00026 00027 /// Object already bound in the Implementation Repository 00028 exception AlreadyRegistered {}; 00029 00030 /// The server could not be restarted. 00031 exception CannotActivate 00032 { 00033 string reason; 00034 }; 00035 00036 /// Object not found in the Implementation Repository 00037 exception NotFound {}; 00038 00039 /// One environment variable/value pair. 00040 struct EnvironmentVariable 00041 { 00042 string name; 00043 string value; 00044 }; 00045 00046 /// Complete Environment. 00047 typedef sequence<EnvironmentVariable> EnvironmentList; 00048 00049 /// The type of Activation 00050 enum ActivationMode {NORMAL, MANUAL, PER_CLIENT, AUTO_START}; 00051 00052 /// Options used to start up the server. 00053 struct StartupOptions 00054 { 00055 /// Startup command (program name and arguments). 00056 string command_line; 00057 00058 /// Environment Variables. 00059 EnvironmentList environment; 00060 00061 /// Working directory. 00062 string working_directory; 00063 00064 /// Activation Mode 00065 ActivationMode activation; 00066 00067 /// Name of the activator 00068 string activator; 00069 00070 /// Number of retries allowed 00071 long start_limit; 00072 }; 00073 00074 struct ServerInformation 00075 { 00076 /// Server name. 00077 string server; 00078 00079 /// How to start up the server. 00080 StartupOptions startup; 00081 00082 /// This is used in places that require a partial IOR with 00083 /// just the ObjectKey missing. 00084 string partial_ior; 00085 }; 00086 00087 typedef sequence <ServerInformation> ServerInformationList; 00088 00089 /** 00090 * @brief The Server Information Iterator Interface 00091 * 00092 * Interface for iterating over servers returned with 00093 * Administration::list (). 00094 */ 00095 interface ServerInformationIterator 00096 { 00097 /// This operation returns at most the requested number of 00098 /// servers. 00099 /// If how_many == 0, then returns all servers 00100 boolean next_n (in unsigned long how_many, 00101 out ServerInformationList servers); 00102 00103 /// This operation destroys the iterator. 00104 void destroy (); 00105 }; 00106 00107 /** 00108 * @brief The Implementation Repository Administration Interface 00109 * 00110 * This interface exports all the administration functionality of 00111 * the Implementation Repository. 00112 */ 00113 interface Administration 00114 { 00115 /// Activate server that is named <server>. 00116 /// 00117 /// The <NotFound> exception is raised when <server> is not found 00118 /// in the Implementation Repository. The <CannotActivate> exception 00119 /// is raised when <server> is found in the Repository but could not be 00120 /// activated. 00121 void activate_server (in string server) 00122 raises (NotFound, CannotActivate); 00123 00124 /// Add/Update the the <server> 00125 /// The <NotFound> exception is raised when the activator specified 00126 /// in the options is not registered. 00127 void add_or_update_server (in string server, in StartupOptions options) 00128 raises(NotFound); 00129 00130 /// Remove <server> from the Implementation Repository. 00131 /// 00132 /// The <NotFound> exception is raised when <server> is not found 00133 /// in the Implementation Repository. 00134 void remove_server (in string server) 00135 raises (NotFound); 00136 00137 /// Tries to shutdown the server, first gracefully, then ungracefully. 00138 /// 00139 /// The <NotFound> exception is raised when <server> is not found 00140 /// in the Implementation Repository. 00141 void shutdown_server (in string server) 00142 raises (NotFound); 00143 00144 /// Used to notify the Implementation Repository that <server> is alive 00145 /// and well at <partial_ior>. 00146 /// 00147 /// The <NotFound> exception is raised when <server> is not found 00148 /// in the Implementation Repository. 00149 void server_is_running (in string server, 00150 in string partial_ior, 00151 in ServerObject server_object) 00152 raises (NotFound); 00153 00154 /// Used to tell the Implementation Repository that <server> is shutting 00155 /// down. 00156 /// 00157 /// The <NotFound> exception is raised when <server> is not found 00158 /// in the Implementation Repository. 00159 00160 void server_is_shutting_down (in string server) 00161 raises (NotFound); 00162 00163 /// Returns the startup information for a given <server>. 00164 void find (in string server, out ServerInformation info); 00165 00166 /// Returns at most <how_many> servers in <server_list>. If there 00167 /// are additional servers, they can be received through the 00168 /// <server_iterator>. If there are no more servers, then 00169 /// <server_iterator> is null. 00170 /// If how_many == 0, then returns all servers. 00171 void list (in unsigned long how_many, 00172 out ServerInformationList server_list, 00173 out ServerInformationIterator server_iterator); 00174 00175 /// Shutdown the ImR, optionally shutting down registered 00176 /// activators and servers first. 00177 oneway void shutdown(in boolean activators, in boolean servers); 00178 }; 00179 }; 00180 00181 #endif /* TAO_IMRCLIENT_IMPLREPO_PIDL */