00001
#ifndef maci_IDL
00002
#define maci_IDL
00003
00015
#include <logging_idl.idl>
00016
#include <ACSErrTypeCommon.idl>
00017
#include <maciErrType.idl>
00018
#include <acscommon.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
00506 typedef sequence <ClientInfo>
ClientInfoSeq;
00507
00557 interface
Container :
Client,
LoggingConfigurable{
00558
00583
ComponentInfo activate_component (
00584 in
Handle h,
00585
00586
00587
00588
00589
00590
00591
00592 in
ExecutionId execution_id,
00593
00594
00595 in string name,
00596
00597
00598 in string exe,
00599
00600
00601
00602
00603
00604
00605
00606
00607
00608
00609
00610
00611 in string type
00612
00613
00614
00615
00616
00617
00618
00619 )
00620 raises (maciErrType::CannotActivateComponentEx);
00621
00622
00629
void deactivate_components (
00630 in
HandleSeq h
00631
00632
00633 )
00634 raises (maciErrType::CannotDeactivateComponentEx);
00635
00636
00645 oneway
void shutdown (
00646 in
unsigned long action
00647
00648
00649
00650
00651
00652
00653
00654
00655
00656
00657
00658
00659
00660
00661 );
00662
00672
ComponentInfoSeq get_component_info (
00673 in
HandleSeq h
00674
00675
00676 );
00677
00682 Object restart_component(
00683 in
Handle h
00684 )
00685 raises (maciErrType::CannotRestartComponentEx);
00686
00688
void set_component_shutdown_order(
00689 in
HandleSeq h
00690 );
00691
00692 const string ContainerStatusStartupBeginMsg =
"ContainerStatusMsg: Startup begins";
00693 const string ContainerStatusStartupEndMsg =
"ContainerStatusMsg: Startup ends";
00694 const string ContainerStatusORBInitBeginMsg =
"ContainerStatusMsg: ORB initialization begins";
00695 const string ContainerStatusORBInitEndMsg =
"ContainerStatusMsg: ORB initialization ends";
00696 const string ContainerStatusMgrInitBeginMsg =
"ContainerStatusMsg: Manager access initialization begins";
00697 const string ContainerStatusMgrInitEndMsg =
"ContainerStatusMsg: Manager access initialization ends";
00698 const string ContainerStatusCompAutoloadBeginMsg =
"ContainerStatusMsg: Automatic component loading begins";
00699 const string ContainerStatusCompAutoloadEndMsg =
"ContainerStatusMsg: Automatic component loading ends";
00700 const string ContainerStatusReadyMsg =
"ContainerStatusMsg: Ready";
00701
00702 };
00703
00707 struct ContainerInfo {
00714 string name;
00715
00719 Handle h;
00720
00724 Container reference;
00725
00729 HandleSeq components;
00730 };
00731
00735 typedef sequence<ContainerInfo>
ContainerInfoSeq;
00736
00746 interface
Administrator :
Client {
00747
00756 oneway
void client_logged_in (
00757 in
ClientInfo info,
00758 in
ACS::Time timestamp,
00759 in
ExecutionId execution_id
00760 );
00761
00770 oneway
void client_logged_out (
00771 in
Handle h,
00772 in
ACS::Time timestamp
00773 );
00774
00783 oneway
void container_logged_in (
00784 in
ContainerInfo info,
00785 in
ACS::Time timestamp,
00786 in
ExecutionId execution_id
00787 );
00788
00797 oneway
void container_logged_out (
00798 in
Handle h,
00799 in
ACS::Time timestamp
00800 );
00801
00811 oneway
void components_requested (
00812 in
HandleSeq clients,
00813 in
HandleSeq components,
00814 in
ACS::Time timestamp
00815 );
00816
00826 oneway
void components_released (
00827 in
HandleSeq clients,
00828 in
HandleSeq components,
00829 in
ACS::Time timestamp
00830 );
00831
00841 oneway
void component_activated (
00842 in
ComponentInfo info,
00843 in
ACS::Time timestamp,
00844 in
ExecutionId execution_id
00845 );
00846
00856 oneway
void component_deactivated (
00857 in
Handle h,
00858 in
ACS::Time timestamp
00859 );
00860 };
00861
00865 interface
SynchronousAdministrator :
Administrator {
00866 };
00867
00871 typedef sequence<Object>
ObjectSeq;
00872
00878 const string
COMPONENT_SPEC_ANY =
"*";
00879
00884 struct ComponentSpec
00885 {
00886 CURL component_name;
00887 string component_type;
00888 string component_code;
00889 string container_name;
00890 };
00891
00895 typedef sequence<ComponentSpec>
ComponentSpecSeq;
00896
00911 interface
Manager :
LoggingConfigurable {
00912
00914 readonly attribute string domain_name;
00915
00920
boolean ping();
00921
00941
ClientInfo login (
00942 in
Client reference
00943 )
00944 raises (maciErrType::NoPermissionEx);
00945
00946
00950
void logout (
00951 in Handle
id
00952 )
00953 raises (maciErrType::NoPermissionEx);
00954
00955
00964
Handle register_component (
00965 in Handle
id,
00966 in string component_url,
00967 in string type,
00968 in Object c
00969 )
00970 raises (maciErrType::NoPermissionEx,
00971 maciErrType::CannotRegisterComponentEx);
00972
00976
void unregister_component (
00977 in Handle
id,
00978 in Handle h
00979 )
00980 raises (maciErrType::NoPermissionEx,
00981 maciErrType::CannotUnregisterComponentEx);
00982
00996 Object get_service (
01003 in Handle
id,
01007 in CURL service_url,
01015 in
boolean activate
01016 )
01017 raises (maciErrType::NoPermissionEx,
01018 maciErrType::CannotGetComponentEx,
01019 maciErrType::ComponentNotAlreadyActivatedEx,
01020 maciErrType::ComponentConfigurationNotFoundEx);
01021
01033 Object get_component (
01040 in Handle
id,
01044 in CURL service_url,
01052 in
boolean activate
01053 )
01054 raises (maciErrType::NoPermissionEx,
01055 maciErrType::CannotGetComponentEx,
01056 maciErrType::ComponentNotAlreadyActivatedEx,
01057 maciErrType::ComponentConfigurationNotFoundEx);
01058
01059
01089 Object get_component_non_sticky (
01095 in Handle
id,
01099 in CURL component_url
01100 )
01101 raises (maciErrType::NoPermissionEx,
01102 maciErrType::CannotGetComponentEx,
01103 maciErrType::ComponentNotAlreadyActivatedEx);
01104
01112
void make_component_immortal (
01113 in Handle
id,
01114 in CURL component_url,
01115 in
boolean immortal_state
01116 )
01117 raises (maciErrType::NoPermissionEx,
01118 maciErrType::ComponentNotAlreadyActivatedEx);
01119
01120
01136
long release_component (
01137 in Handle
id,
01138 in CURL component_url
01139 )
01140 raises (maciErrType::NoPermissionEx);
01141
01147
long force_release_component (
01148 in Handle
id,
01149 in CURL component_url
01150 )
01151 raises (maciErrType::NoPermissionEx);
01152
01165 oneway
void shutdown (
01166 in Handle
id,
01167 in
unsigned long containers
01168 );
01169
01183
ContainerInfoSeq get_container_info (
01184 in Handle
id,
01185 in HandleSeq h,
01186 in string name_wc
01187 )
01188 raises (maciErrType::NoPermissionEx);
01189
01203
ClientInfoSeq get_client_info (
01204 in Handle
id,
01205 in HandleSeq h,
01206 in string name_wc
01207 )
01208 raises (maciErrType::NoPermissionEx);
01209
01232
ComponentInfoSeq get_component_info (
01233 in Handle
id,
01234 in HandleSeq h,
01235 in string name_wc,
01236 in string type_wc,
01237 in
boolean active_only
01238 )
01239 raises (maciErrType::NoPermissionEx);
01240
01244 Object restart_component(
01245 in Handle client,
01246 in CURL component_url
01247 )
01248 raises (maciErrType::NoPermissionEx,
01249 maciErrType::CannotGetComponentEx);
01250
01254
ComponentInfo get_dynamic_component(
01255 in Handle client,
01256 in
ComponentSpec c,
01257 in
boolean mark_as_default
01258 )
01259 raises (maciErrType::NoPermissionEx,
01260 maciErrType::IncompleteComponentSpecEx,
01261 maciErrType::InvalidComponentSpecEx,
01262 maciErrType::ComponentSpecIncompatibleWithActiveComponentEx,
01263 maciErrType::CannotGetComponentEx);
01264
01269
ComponentInfo get_collocated_component(
01270 in Handle client,
01271 in
ComponentSpec c,
01272 in
boolean mark_as_default,
01273 in CURL target_component
01274 )
01275 raises (maciErrType::NoPermissionEx,
01276 maciErrType::IncompleteComponentSpecEx,
01277 maciErrType::InvalidComponentSpecEx,
01278 maciErrType::ComponentSpecIncompatibleWithActiveComponentEx,
01279 maciErrType::CannotGetComponentEx);
01280
01284
ComponentInfo get_default_component(
01285 in Handle client,
01286 in string component_type
01287 )
01288 raises (maciErrType::NoPermissionEx,
01289 maciErrType::NoDefaultComponentEx,
01290 maciErrType::CannotGetComponentEx);
01291
01295
void shutdown_container(
01296 in Handle
id,
01297 in string container_name,
01298 in
unsigned long action
01299 )
01300 raises (maciErrType::NoPermissionEx);
01301
01302 };
01303
01304 };
01305
01306
#pragma prefix "maci.ijs.si"
01307
01311 module AccessRights {
01312
01318 const maci::AccessDescriptor INTROSPECT_MANAGER = 0x08000000;
01319
01325 const maci::AccessDescriptor SHUTDOWN_SYSTEM = 0x04000000;
01326
01331 const maci::AccessDescriptor REGISTER_COMPONENT = 0x02000000;
01332 };
01333
01334
01335
#endif