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
00083 typedef string CURL;
00084
00088 typedef sequence<string> CURLSeq;
00089
00093 typedef sequence<unsigned long> ulongSeq;
00094
00098 typedef ulongSeq HandleSeq;
00099
00103 typedef long long ExecutionId;
00104
00124 interface LoggingConfigurable {
00125
00126
00127
00128
00129 struct LogLevels {
00135 boolean useDefault;
00137 AcsLogLevels::logLevelValue minLogLevel;
00139 AcsLogLevels::logLevelValue minLogLevelLocal;
00140 };
00141
00147 LogLevels get_default_logLevels();
00148
00153 void set_default_logLevels(in LogLevels levels)
00154 raises (ACSErrTypeCommon::IllegalArgumentEx);
00155
00162 stringSeq get_logger_names();
00163
00171 LogLevels get_logLevels(in string logger_name)
00172 raises (maciErrType::LoggerDoesNotExistEx);
00173
00184 void set_logLevels(in string logger_name, in LogLevels levels)
00185 raises (maciErrType::LoggerDoesNotExistEx, ACSErrTypeCommon::IllegalArgumentEx);
00186
00198 oneway void refresh_logging_config();
00199 };
00200
00201
00205 struct ComponentInfo {
00212 string type;
00213
00218 string code;
00219
00224 Object reference;
00225
00232 string name;
00233
00244 HandleSeq clients;
00245
00252 Handle container;
00253
00257 string container_name;
00258
00263 Handle h;
00264
00273 AccessDescriptor access;
00274
00281 stringSeq interfaces;
00282 };
00283
00287 typedef sequence<ComponentInfo> ComponentInfoSeq;
00288
00289 enum ImplLangType { JAVA, CPP, PYTHON };
00290 enum ClientType { CLIENT_TYPE, ADMINISTRATOR_TYPE, CONTAINER_TYPE };
00291 struct AuthenticationData {
00292 string answer;
00293 ClientType client_type;
00294 ImplLangType impl_lang;
00295 boolean recover;
00296 ACS::Time timestamp;
00297
00298 ExecutionId execution_id;
00299
00300
00301 };
00302
00314 interface Client {
00318 const short MSG_ERROR = 0;
00319
00323 const short MSG_INFORMATION = 20;
00324
00328 const short MSGID_AUTOLOAD_START = 1;
00329
00333 const short MSGID_AUTOLOAD_END = 2;
00334
00338 readonly attribute string name;
00339
00350 oneway void disconnect ();
00351
00370 AuthenticationData authenticate (
00371 in ExecutionId execution_id,
00372 in string question
00373 );
00374
00384 oneway void message (
00385 in short type,
00386 in string message
00387 );
00388
00398 oneway void taggedmessage (
00399 in short type,
00400 in short messageID,
00401 in string message
00402 );
00403
00422 boolean ping ();
00423
00435 oneway void components_available (
00444 in ComponentInfoSeq components
00445 );
00446
00456 oneway void components_unavailable (
00457 in stringSeq component_names
00458 );
00459
00460 };
00461
00467 struct ClientInfo {
00473 Handle h;
00479 Client reference;
00487 HandleSeq components;
00494 string name;
00500 AccessDescriptor access;
00501 };
00502
00520 interface CBComponentInfo : ACS::Callback {
00531 oneway void working (in ComponentInfo value,
00532 in ACSErr::Completion c,
00533 in ACS::CBDescOut desc);
00534
00545 oneway void done (in ComponentInfo value,
00546 in ACSErr::Completion c,
00547 in ACS::CBDescOut desc);
00548 };
00549
00553 typedef sequence <ClientInfo> ClientInfoSeq;
00554
00604 interface Container : Client, LoggingConfigurable{
00605
00630 ComponentInfo activate_component (
00631 in Handle h,
00632
00633
00634
00635
00636
00637
00638
00639 in ExecutionId execution_id,
00640
00641
00642 in string name,
00643
00644
00645 in string exe,
00646
00647
00648
00649
00650
00651
00652
00653
00654
00655
00656
00657
00658 in string type
00659
00660
00661
00662
00663
00664
00665
00666 )
00667 raises (maciErrType::CannotActivateComponentEx);
00668
00669
00674 void activate_component_async (
00675 in Handle h,
00676
00677
00678
00679
00680
00681
00682
00683 in ExecutionId execution_id,
00684
00685
00686 in string name,
00687
00688
00689 in string exe,
00690
00691
00692
00693
00694
00695
00696
00697
00698
00699
00700
00701
00702 in string type,
00703
00704
00705
00706
00707
00708
00709
00710
00711 in CBComponentInfo callback,
00712 in ACS::CBDescIn desc
00713 )
00714 ;
00715
00725 void deactivate_component (
00726 in Handle h
00727
00728
00729 )
00730 raises (maciErrType::CannotDeactivateComponentEx, maciErrType::ComponentDeactivationUncleanEx, maciErrType::ComponentDeactivationFailedEx);
00731
00732
00741 oneway void shutdown (
00742 in unsigned long action
00743
00744
00745
00746
00747
00748
00749
00750
00751
00752
00753
00754
00755
00756
00757 );
00758
00768 ComponentInfoSeq get_component_info (
00769 in HandleSeq h
00770
00771
00772 );
00773
00778 Object restart_component(
00779 in Handle h
00780 )
00781 raises (maciErrType::CannotRestartComponentEx);
00782
00784 void set_component_shutdown_order(
00785 in HandleSeq h
00786 );
00787
00788 const string ContainerStatusStartupBeginMsg = "ContainerStatusMsg: Startup begins";
00789 const string ContainerStatusStartupEndMsg = "ContainerStatusMsg: Startup ends";
00790 const string ContainerStatusORBInitBeginMsg = "ContainerStatusMsg: ORB initialization begins";
00791 const string ContainerStatusORBInitEndMsg = "ContainerStatusMsg: ORB initialization ends";
00792 const string ContainerStatusMgrInitBeginMsg = "ContainerStatusMsg: Manager access initialization begins";
00793 const string ContainerStatusMgrInitEndMsg = "ContainerStatusMsg: Manager access initialization ends";
00794 const string ContainerStatusCompAutoloadBeginMsg = "ContainerStatusMsg: Automatic component loading begins";
00795 const string ContainerStatusCompAutoloadEndMsg = "ContainerStatusMsg: Automatic component loading ends";
00796 const string ContainerStatusReadyMsg = "ContainerStatusMsg: Ready";
00797
00798 };
00799
00803 struct ContainerInfo {
00810 string name;
00811
00815 Handle h;
00816
00820 Container reference;
00821
00825 HandleSeq components;
00826 };
00827
00831 typedef sequence<ContainerInfo> ContainerInfoSeq;
00832
00842 interface Administrator : Client {
00843
00852 oneway void client_logged_in (
00853 in ClientInfo info,
00854 in ACS::Time timestamp,
00855 in ExecutionId execution_id
00856 );
00857
00866 oneway void client_logged_out (
00867 in Handle h,
00868 in ACS::Time timestamp
00869 );
00870
00879 oneway void container_logged_in (
00880 in ContainerInfo info,
00881 in ACS::Time timestamp,
00882 in ExecutionId execution_id
00883 );
00884
00893 oneway void container_logged_out (
00894 in Handle h,
00895 in ACS::Time timestamp
00896 );
00897
00907 oneway void components_requested (
00908 in HandleSeq clients,
00909 in HandleSeq components,
00910 in ACS::Time timestamp
00911 );
00912
00922 oneway void components_released (
00923 in HandleSeq clients,
00924 in HandleSeq components,
00925 in ACS::Time timestamp
00926 );
00927
00937 oneway void component_activated (
00938 in ComponentInfo info,
00939 in ACS::Time timestamp,
00940 in ExecutionId execution_id
00941 );
00942
00952 oneway void component_deactivated (
00953 in Handle h,
00954 in ACS::Time timestamp
00955 );
00956 };
00957
00961 interface SynchronousAdministrator : Administrator {
00962 };
00963
00967 typedef sequence<Object> ObjectSeq;
00968
00974 const string COMPONENT_SPEC_ANY = "*";
00975
00980 struct ComponentSpec
00981 {
00982 CURL component_name;
00983 string component_type;
00984 string component_code;
00985 string container_name;
00986 };
00987
00991 typedef sequence<ComponentSpec> ComponentSpecSeq;
00992
01007 interface Manager : LoggingConfigurable {
01008
01010 readonly attribute string domain_name;
01011
01016 boolean ping();
01017
01037 ClientInfo login (
01038 in Client reference
01039 )
01040 raises (maciErrType::NoPermissionEx);
01041
01042
01046 void logout (
01047 in Handle id
01048 )
01049 raises (maciErrType::NoPermissionEx);
01050
01051
01060 Handle register_component (
01061 in Handle id,
01062 in string component_url,
01063 in string type,
01064 in Object c
01065 )
01066 raises (maciErrType::NoPermissionEx,
01067 maciErrType::CannotRegisterComponentEx);
01068
01072 void unregister_component (
01073 in Handle id,
01074 in Handle h
01075 )
01076 raises (maciErrType::NoPermissionEx,
01077 maciErrType::CannotUnregisterComponentEx);
01078
01092 Object get_service (
01099 in Handle id,
01103 in CURL service_url,
01111 in boolean activate
01112 )
01113 raises (maciErrType::NoPermissionEx,
01114 maciErrType::CannotGetComponentEx,
01115 maciErrType::ComponentNotAlreadyActivatedEx,
01116 maciErrType::ComponentConfigurationNotFoundEx);
01117
01129 Object get_component (
01136 in Handle id,
01140 in CURL service_url,
01148 in boolean activate
01149 )
01150 raises (maciErrType::NoPermissionEx,
01151 maciErrType::CannotGetComponentEx,
01152 maciErrType::ComponentNotAlreadyActivatedEx,
01153 maciErrType::ComponentConfigurationNotFoundEx);
01154
01155
01185 Object get_component_non_sticky (
01191 in Handle id,
01195 in CURL component_url
01196 )
01197 raises (maciErrType::NoPermissionEx,
01198 maciErrType::CannotGetComponentEx,
01199 maciErrType::ComponentNotAlreadyActivatedEx);
01200
01208 void make_component_immortal (
01209 in Handle id,
01210 in CURL component_url,
01211 in boolean immortal_state
01212 )
01213 raises (maciErrType::NoPermissionEx,
01214 maciErrType::ComponentNotAlreadyActivatedEx);
01215
01216
01235 void release_component_async (
01236 in Handle id,
01237 in CURL component_url,
01238 in ACS::CBlong callback,
01239 in ACS::CBDescIn desc
01240 )
01241 raises (maciErrType::NoPermissionEx);
01242
01258 long release_component (
01259 in Handle id,
01260 in CURL component_url
01261 )
01262 raises (maciErrType::NoPermissionEx, maciErrType::CannotDeactivateComponentEx,
01263 maciErrType::ComponentDeactivationUncleanEx, maciErrType::ComponentDeactivationFailedEx);
01264
01270 long force_release_component (
01271 in Handle id,
01272 in CURL component_url
01273 )
01274 raises (maciErrType::NoPermissionEx);
01275
01288 oneway void shutdown (
01289 in Handle id,
01290 in unsigned long containers
01291 );
01292
01306 ContainerInfoSeq get_container_info (
01307 in Handle id,
01308 in HandleSeq h,
01309 in string name_wc
01310 )
01311 raises (maciErrType::NoPermissionEx);
01312
01326 ClientInfoSeq get_client_info (
01327 in Handle id,
01328 in HandleSeq h,
01329 in string name_wc
01330 )
01331 raises (maciErrType::NoPermissionEx);
01332
01355 ComponentInfoSeq get_component_info (
01356 in Handle id,
01357 in HandleSeq h,
01358 in string name_wc,
01359 in string type_wc,
01360 in boolean active_only
01361 )
01362 raises (maciErrType::NoPermissionEx);
01363
01367 Object restart_component(
01368 in Handle client,
01369 in CURL component_url
01370 )
01371 raises (maciErrType::NoPermissionEx,
01372 maciErrType::CannotGetComponentEx);
01373
01377 ComponentInfo get_dynamic_component(
01378 in Handle client,
01379 in ComponentSpec c,
01380 in boolean mark_as_default
01381 )
01382 raises (maciErrType::NoPermissionEx,
01383 maciErrType::IncompleteComponentSpecEx,
01384 maciErrType::InvalidComponentSpecEx,
01385 maciErrType::ComponentSpecIncompatibleWithActiveComponentEx,
01386 maciErrType::CannotGetComponentEx);
01387
01392 ComponentInfo get_collocated_component(
01393 in Handle client,
01394 in ComponentSpec c,
01395 in boolean mark_as_default,
01396 in CURL target_component
01397 )
01398 raises (maciErrType::NoPermissionEx,
01399 maciErrType::IncompleteComponentSpecEx,
01400 maciErrType::InvalidComponentSpecEx,
01401 maciErrType::ComponentSpecIncompatibleWithActiveComponentEx,
01402 maciErrType::CannotGetComponentEx);
01403
01407 ComponentInfo get_default_component(
01408 in Handle client,
01409 in string component_type
01410 )
01411 raises (maciErrType::NoPermissionEx,
01412 maciErrType::NoDefaultComponentEx,
01413 maciErrType::CannotGetComponentEx);
01414
01418 void shutdown_container(
01419 in Handle id,
01420 in string container_name,
01421 in unsigned long action
01422 )
01423 raises (maciErrType::NoPermissionEx);
01424
01425 };
01426
01427 };
01428
01429 #pragma prefix "maci.ijs.si"
01430
01434 module AccessRights {
01435
01441 const maci::AccessDescriptor INTROSPECT_MANAGER = 0x08000000;
01442
01448 const maci::AccessDescriptor SHUTDOWN_SYSTEM = 0x04000000;
01449
01454 const maci::AccessDescriptor REGISTER_COMPONENT = 0x02000000;
01455 };
01456
01457
01458 #endif