diff options
Diffstat (limited to 'CIAO/ciao/CCM_Component.idl')
-rw-r--r-- | CIAO/ciao/CCM_Component.idl | 142 |
1 files changed, 138 insertions, 4 deletions
diff --git a/CIAO/ciao/CCM_Component.idl b/CIAO/ciao/CCM_Component.idl index 8a604edf085..32c0299acf0 100644 --- a/CIAO/ciao/CCM_Component.idl +++ b/CIAO/ciao/CCM_Component.idl @@ -14,9 +14,143 @@ #if !defined (CCM_COMPONENT_IDL) #define CCM_COMPONENT_IDL -#include "ciao/CCM_Events.idl" -#include "ciao/CCM_Home.idl" -#include "ciao/CCM_Object.idl" -#include "ciao/CCM_Enumeration.idl" +#include "CCM_Event.idl" +#include "tao/IFR_Client/IFR_Base.pidl" +module Components +{ + typeprefix Components "omg.org"; + + abstract valuetype PrimaryKeyBase {}; + + interface CCMObject; //forward reference + + interface CCMHome + { + CORBA::IRObject get_component_def (); + CORBA::IRObject get_home_def (); + void remove_component ( in CCMObject comp) + raises (RemoveFailure); + }; + typedef sequence<CCMHome> CCMHomes; + + interface KeylessCCMHome + { + CCMObject create_component() + raises (CreateFailure); + }; + + interface HomeFinder + { + CCMHome find_home_by_component_type (in CORBA::RepositoryId comp_repid) + raises (HomeNotFound); + + CCMHome find_home_by_home_type (in CORBA::RepositoryId home_repid) + raises (HomeNotFound); + + CCMHome find_home_by_name (in string home_name) + raises (HomeNotFound); + }; + + interface Configurator + { + void configure (in CCMObject comp) + raises (WrongComponentType); + }; + + valuetype ConfigValue + { + public FeatureName name; + public any value; + }; + + typedef sequence<ConfigValue> ConfigValues; + + interface StandardConfigurator : Configurator + { + void set_configuration (in ConfigValues descr); + }; + + interface HomeConfiguration : CCMHome + { + void set_configurator (in Configurator cfg); + void set_configuration_values (in ConfigValues config); + void complete_component_configuration (in boolean b); + void disable_home_configuration(); + }; + + valuetype ComponentPortDescription + { + public FacetDescriptions facets; + public ReceptacleDescriptions receptacles; + public ConsumerDescriptions consumers; + public EmitterDescriptions emitters; + public PublisherDescriptions publishers; + }; + + interface CCMObject : Navigation, Receptacles, Events + { + CORBA::IRObject get_component_def ( ); + CCMHome get_ccm_home( ); + PrimaryKeyBase get_primary_key( ) + raises (NoKeyAvailable); + void remove() + raises (RemoveFailure); + ComponentPortDescription get_all_ports (); + + /// Factory method to return a StandardConfigurator interface. CIAO specific + StandardConfigurator get_standard_configurator ( ); + + /// CIAO specific operations to have some control on when and how + /// to activate components. + /** + * This is all from our work on ARMS where we needed to know whether + * every component has been configured, say for example to use + * logging in the assembly which could in turn be provided by a + * component. To get around all this we are adding some methods on + * this till we think of some standard way to do this. The problem + * is that the deployer should be able to call this as opposed to + * the home calling it as soon as the component is created. + * + * All these operations are called in the order mentioned, ie. the + * deployer calls ciao_preactivate () on all components, then + * ciao_activate and then ciao_postactivate (). The speciality is + * that these operations would be invoked on every target object + * before the next call is made. It is similar to the way + * portable interceptors work, trying to get everything onto the + * flow stack, but differ in the intention. + */ + void ciao_preactivate () + raises (InvalidConfiguration); + + void ciao_activate () + raises (InvalidConfiguration); + + void ciao_postactivate () + raises (InvalidConfiguration); + + void ciao_passivate () + raises (InvalidConfiguration); + + void configuration_complete () + raises (InvalidConfiguration); + }; + + /// @@ Enumeration and DefaultEnumeration are only for EJB to CCM + /// mapping? At any rate, we should be able to skip them for now. + /// @todo Move these then to a seperate file so that the linker can + /// optimize things out of the executable when building staticly + abstract valuetype Enumeration + { + boolean has_more_elements(); + CCMObject next_element(); + }; + + typedef sequence<CCMObject> CCMObjectSeq; + + valuetype DefaultEnumeration : Enumeration + { + private CCMObjectSeq objects; + }; +}; #endif /* CCM_COMPONENT_IDL */ |