00001 #ifndef maci_IDL
00002 #define maci_IDL
00003
00015 #include <acscommon.idl>
00016 #include <logging_idl.idl>
00017 #include <ACSErrTypeCommon.idl>
00018 #include <maciErrType.idl>
00019
00020 #pragma prefix "ijs.si"
00021 module maci {
00022
00030 typedef unsigned long AccessDescriptor;
00031
00035 typedef sequence <string> stringSeq;
00036
00061 typedef unsigned long Handle;
00062
00070 const Handle HANDLE_MANAGER_MASK = 0x05000000;
00071
00092 typedef string CURL;
00093
00097 typedef sequence<string> CURLSeq;
00098
00102 typedef sequence<unsigned long> ulongSeq;
00103
00107 typedef ulongSeq HandleSeq;
00108
00112 typedef long long ExecutionId;
00113
00114
00118 struct ComponentInfo {
00125 string type;
00126
00131 string code;
00132
00137 Object reference;
00138
00145 string name;
00146
00157 HandleSeq clients;
00158
00165 Handle container;
00166
00170 string container_name;
00171
00176 Handle h;
00177
00186 AccessDescriptor access;
00187
00194 stringSeq interfaces;
00195 };
00196
00200 typedef sequence<ComponentInfo> ComponentInfoSeq;
00201
00202 enum ImplLangType { JAVA, CPP, PYTHON };
00203 enum ClientType { CLIENT_TYPE, ADMINISTRATOR_TYPE, CONTAINER_TYPE };
00204 struct AuthenticationData {
00205 string answer;
00206 ClientType client_type;
00207 ImplLangType impl_lang;
00208 boolean recover;
00209 ACS::Time timestamp;
00210
00211 ExecutionId execution_id;
00212
00213
00214 };
00215
00227 interface Client {
00231 const short MSG_ERROR = 0;
00232
00236 const short MSG_INFORMATION = 20;
00237
00241 const short MSGID_AUTOLOAD_START = 1;
00242
00246 const short MSGID_AUTOLOAD_END = 2;
00247
00251 readonly attribute string name;
00252
00263 oneway void disconnect ();
00264
00283 AuthenticationData authenticate (
00284 in ExecutionId execution_id,
00285 in string question
00286 );
00287
00297 oneway void message (
00298 in short type,
00299 in string message
00300 );
00301
00311 oneway void taggedmessage (
00312 in short type,
00313 in short messageID,
00314 in string message
00315 );
00316
00335 boolean ping ();
00336
00348 oneway void components_available (
00357 in ComponentInfoSeq components
00358 );
00359
00369 oneway void components_unavailable (
00370 in stringSeq component_names
00371 );
00372
00373 };
00374
00380 struct ClientInfo {
00386 Handle h;
00392 Client reference;
00400 HandleSeq components;
00407 string name;
00413 AccessDescriptor access;
00414 };
00415
00433 interface CBComponentInfo : ACS::Callback {
00444 void working (in ComponentInfo value,
00445 in ACSErr::Completion c,
00446 in ACS::CBDescOut desc);
00447
00458 void done (in ComponentInfo value,
00459 in ACSErr::Completion c,
00460 in ACS::CBDescOut desc);
00461 };
00462
00466 typedef sequence <ClientInfo> ClientInfoSeq;
00467
00517 interface Container : Client, ::Logging::LoggingConfigurable, ::Logging::ACSLogStatistics {
00518
00523 Handle get_handle ();
00524
00549 ComponentInfo activate_component (
00550 in Handle h,
00551
00552
00553
00554
00555
00556
00557
00558 in ExecutionId execution_id,
00559
00560
00561 in string name,
00562
00563
00564 in string exe,
00565
00566
00567
00568
00569
00570
00571
00572
00573
00574
00575
00576
00577 in string type
00578
00579
00580
00581
00582
00583
00584
00585 )
00586 raises (maciErrType::CannotActivateComponentEx);
00587
00588
00593 void activate_component_async (
00594 in Handle h,
00595
00596
00597
00598
00599
00600
00601
00602 in ExecutionId execution_id,
00603
00604
00605 in string name,
00606
00607
00608 in string exe,
00609
00610
00611
00612
00613
00614
00615
00616
00617
00618
00619
00620
00621 in string type,
00622
00623
00624
00625
00626
00627
00628
00629
00630 in CBComponentInfo callback,
00631 in ACS::CBDescIn desc
00632 )
00633 ;
00634
00644 void deactivate_component (
00645 in Handle h
00646
00647
00648 )
00649 raises (maciErrType::CannotDeactivateComponentEx, maciErrType::ComponentDeactivationUncleanEx, maciErrType::ComponentDeactivationFailedEx);
00650
00651
00660 oneway void shutdown (
00661 in unsigned long action
00662
00663
00664
00665
00666
00667
00668
00669
00670
00671
00672
00673
00674
00675
00676 );
00677
00687 ComponentInfoSeq get_component_info (
00688 in HandleSeq h
00689
00690
00691 );
00692
00697 Object restart_component(
00698 in Handle h
00699 )
00700 raises (maciErrType::CannotRestartComponentEx);
00701
00703 void set_component_shutdown_order(
00704 in HandleSeq h
00705 );
00706
00707 const string ContainerStatusStartupBeginMsg = "ContainerStatusMsg: Startup begins";
00708 const string ContainerStatusStartupEndMsg = "ContainerStatusMsg: Startup ends";
00709 const string ContainerStatusORBInitBeginMsg = "ContainerStatusMsg: ORB initialization begins";
00710 const string ContainerStatusORBInitEndMsg = "ContainerStatusMsg: ORB initialization ends";
00711 const string ContainerStatusMgrInitBeginMsg = "ContainerStatusMsg: Manager access initialization begins";
00712 const string ContainerStatusMgrInitEndMsg = "ContainerStatusMsg: Manager access initialization ends";
00713 const string ContainerStatusCompAutoloadBeginMsg = "ContainerStatusMsg: Automatic component loading begins";
00714 const string ContainerStatusCompAutoloadEndMsg = "ContainerStatusMsg: Automatic component loading ends";
00715 const string ContainerStatusReadyMsg = "ContainerStatusMsg: Ready";
00716
00717 };
00718
00722 struct ContainerInfo {
00729 string name;
00730
00734 Handle h;
00735
00739 Container reference;
00740
00744 HandleSeq components;
00745 };
00746
00750 typedef sequence<ContainerInfo> ContainerInfoSeq;
00751
00761 interface Administrator : Client {
00762
00771 oneway void client_logged_in (
00772 in ClientInfo info,
00773 in ACS::Time timestamp,
00774 in ExecutionId execution_id
00775 );
00776
00785 oneway void client_logged_out (
00786 in Handle h,
00787 in ACS::Time timestamp
00788 );
00789
00798 oneway void container_logged_in (
00799 in ContainerInfo info,
00800 in ACS::Time timestamp,
00801 in ExecutionId execution_id
00802 );
00803
00812 oneway void container_logged_out (
00813 in Handle h,
00814 in ACS::Time timestamp
00815 );
00816
00826 oneway void components_requested (
00827 in HandleSeq clients,
00828 in HandleSeq components,
00829 in ACS::Time timestamp
00830 );
00831
00841 oneway void components_released (
00842 in HandleSeq clients,
00843 in HandleSeq components,
00844 in ACS::Time timestamp
00845 );
00846
00856 oneway void component_activated (
00857 in ComponentInfo info,
00858 in ACS::Time timestamp,
00859 in ExecutionId execution_id
00860 );
00861
00871 oneway void component_deactivated (
00872 in Handle h,
00873 in ACS::Time timestamp
00874 );
00875 };
00876
00880 interface SynchronousAdministrator : Administrator {
00881 };
00882
00886 typedef sequence<Object> ObjectSeq;
00887
00893 const string COMPONENT_SPEC_ANY = "*";
00894
00899 struct ComponentSpec
00900 {
00901 CURL component_name;
00902 string component_type;
00903 string component_code;
00904 string container_name;
00905 };
00906
00910 typedef sequence<ComponentSpec> ComponentSpecSeq;
00911
00926 interface Manager : ::Logging::LoggingConfigurable {
00927
00929 readonly attribute string domain_name;
00930
00935 boolean ping();
00936
00956 ClientInfo login (
00957 in Client reference
00958 )
00959 raises (maciErrType::NoPermissionEx);
00960
00961
00965 void logout (
00966 in Handle id
00967 )
00968 raises (maciErrType::NoPermissionEx);
00969
00970
00979 Handle register_component (
00980 in Handle id,
00981 in string component_url,
00982 in string type,
00983 in Object c
00984 )
00985 raises (maciErrType::NoPermissionEx,
00986 maciErrType::CannotRegisterComponentEx);
00987
00991 void unregister_component (
00992 in Handle id,
00993 in Handle h
00994 )
00995 raises (maciErrType::NoPermissionEx,
00996 maciErrType::CannotUnregisterComponentEx);
00997
01011 Object get_service (
01018 in Handle id,
01022 in CURL service_url,
01030 in boolean activate
01031 )
01032 raises (maciErrType::NoPermissionEx,
01033 maciErrType::CannotGetComponentEx,
01034 maciErrType::ComponentNotAlreadyActivatedEx,
01035 maciErrType::ComponentConfigurationNotFoundEx);
01036
01048 Object get_component (
01055 in Handle id,
01059 in CURL service_url,
01067 in boolean activate
01068 )
01069 raises (maciErrType::NoPermissionEx,
01070 maciErrType::CannotGetComponentEx,
01071 maciErrType::ComponentNotAlreadyActivatedEx,
01072 maciErrType::ComponentConfigurationNotFoundEx);
01073
01074
01104 Object get_component_non_sticky (
01110 in Handle id,
01114 in CURL component_url
01115 )
01116 raises (maciErrType::NoPermissionEx,
01117 maciErrType::CannotGetComponentEx,
01118 maciErrType::ComponentNotAlreadyActivatedEx);
01119
01127 void make_component_immortal (
01128 in Handle id,
01129 in CURL component_url,
01130 in boolean immortal_state
01131 )
01132 raises (maciErrType::NoPermissionEx,
01133 maciErrType::ComponentNotAlreadyActivatedEx);
01134
01135
01154 void release_component_async (
01155 in Handle id,
01156 in CURL component_url,
01157 in ACS::CBlong callback,
01158 in ACS::CBDescIn desc
01159 )
01160 raises (maciErrType::NoPermissionEx);
01161
01177 long release_component (
01178 in Handle id,
01179 in CURL component_url
01180 )
01181 raises (maciErrType::NoPermissionEx, maciErrType::CannotDeactivateComponentEx,
01182 maciErrType::ComponentDeactivationUncleanEx, maciErrType::ComponentDeactivationFailedEx);
01183
01189 long force_release_component (
01190 in Handle id,
01191 in CURL component_url
01192 )
01193 raises (maciErrType::NoPermissionEx);
01194
01207 oneway void shutdown (
01208 in Handle id,
01209 in unsigned long containers
01210 );
01211
01225 ContainerInfoSeq get_container_info (
01226 in Handle id,
01227 in HandleSeq h,
01228 in string name_wc
01229 )
01230 raises (maciErrType::NoPermissionEx);
01231
01245 ClientInfoSeq get_client_info (
01246 in Handle id,
01247 in HandleSeq h,
01248 in string name_wc
01249 )
01250 raises (maciErrType::NoPermissionEx);
01251
01274 ComponentInfoSeq get_component_info (
01275 in Handle id,
01276 in HandleSeq h,
01277 in string name_wc,
01278 in string type_wc,
01279 in boolean active_only
01280 )
01281 raises (maciErrType::NoPermissionEx);
01282
01286 Object restart_component(
01287 in Handle client,
01288 in CURL component_url
01289 )
01290 raises (maciErrType::NoPermissionEx,
01291 maciErrType::CannotGetComponentEx);
01292
01296 ComponentInfo get_dynamic_component(
01297 in Handle client,
01298 in ComponentSpec c,
01299 in boolean mark_as_default
01300 )
01301 raises (maciErrType::NoPermissionEx,
01302 maciErrType::IncompleteComponentSpecEx,
01303 maciErrType::InvalidComponentSpecEx,
01304 maciErrType::ComponentSpecIncompatibleWithActiveComponentEx,
01305 maciErrType::CannotGetComponentEx);
01306
01311 ComponentInfo get_collocated_component(
01312 in Handle client,
01313 in ComponentSpec c,
01314 in boolean mark_as_default,
01315 in CURL target_component
01316 )
01317 raises (maciErrType::NoPermissionEx,
01318 maciErrType::IncompleteComponentSpecEx,
01319 maciErrType::InvalidComponentSpecEx,
01320 maciErrType::ComponentSpecIncompatibleWithActiveComponentEx,
01321 maciErrType::CannotGetComponentEx);
01322
01326 ComponentInfo get_default_component(
01327 in Handle client,
01328 in string component_type
01329 )
01330 raises (maciErrType::NoPermissionEx,
01331 maciErrType::NoDefaultComponentEx,
01332 maciErrType::CannotGetComponentEx);
01333
01337 void shutdown_container(
01338 in Handle id,
01339 in string container_name,
01340 in unsigned long action
01341 )
01342 raises (maciErrType::NoPermissionEx);
01343
01346 void set_state_persistence(
01347 in Handle id,
01348 in boolean enable
01349 )
01350 raises (maciErrType::NoPermissionEx);
01351
01352 };
01353
01354 };
01355
01356 #pragma prefix "maci.ijs.si"
01357
01361 module AccessRights {
01362
01368 const maci::AccessDescriptor INTROSPECT_MANAGER = 0x08000000;
01369
01375 const maci::AccessDescriptor SHUTDOWN_SYSTEM = 0x04000000;
01376
01381 const maci::AccessDescriptor REGISTER_COMPONENT = 0x02000000;
01382 };
01383
01384
01385 #endif