summaryrefslogtreecommitdiff
path: root/CIAO/ciao/Containers/Container_Base.idl
blob: 8c29b6817a3ec1c47c9c50c91ee9d2f776ecf37e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/**
 * @file Container_Base.idl
 * @author William R. Otte <wotte@dre.vanderbilt.edu>
 * $Id$
 * Container local interface.
 */

#include "tao/PortableServer/PortableServer_include.pidl"
#include "ccm/CCM_Home.idl"
#include "ccm/CCM_Base.idl"
#include "ciao/Containers/CIAO_Servant_Activator.idl"

module CIAO
{
  module Container_Types
  {
    enum OA_Type
    {
      COMPONENT_t,
      HOME_t,
      FACET_CONSUMER_t
    };
  };
  
  exception InvalidComponent
  {  
  };
  
  /**
   * @interface Container
   * @brief Internal container interfaces. 
   *
   * This interface provides interfactes to two portions of the CIAO
   * container architecture:  The generic external container interface 
   * created by the component server, and the component specific container
   * portions generated by the CIDL compiler (the component servant)
   */
  local interface Container 
  {
    CORBA::PolicyList get_receptacle_policy (in string name);
    // **** Methods used by external container
    Components::CCMHome install_home (in string primary_artifact,
                                      in string entry_point,
                                      in string servant_artifact,
                                      in string servant_entrypoint,
                                      in string name);
    
    void uninstall_home (in Components::CCMHome homeptr);
    
    Components::CCMObject install_component (in string primary_artifact,
                                             in string entry_point,
                                             in string servant_artifact,
                                             in string servant_entrypoint,
                                             in string name);
    
    void activate_component (in Components::CCMObject name);
    
    void passivate_component (in Components::CCMObject name);
    
    void uninstall_component (in Components::CCMObject compptr);

    void connect_local_facet (in ::Components::CCMObject provider_ref,
			      in string provider_port,
			      in ::Components::CCMObject user_ref,
			      in string user_port)
      raises (::Components::InvalidConnection,
	      ::Components::AlreadyConnected);
    
    void disconnect_local_facet (in ::Components::CCMObject provider_ref,
				 in string provider_port,
				 in ::Components::CCMObject user_ref,
				 in string user_port)
      raises (::Components::InvalidConnection);

    // *** Methods used by component specific container portions
    Object install_servant (in PortableServer::Servant svnt, 
                            in Container_Types::OA_Type type,
                            out PortableServer::ObjectId oid);
    
    void uninstall_servant (in PortableServer::Servant compptr, 
                            in Container_Types::OA_Type type,
                            out PortableServer::ObjectId oid);
    
    Servant_Activator ports_servant_activator ();
    
    Object generate_reference (in string obj_id,
                               in string repo_id,
                               in Container_Types::OA_Type type);
    
    Object get_objref (in PortableServer::Servant p);
    
    PortableServer::POA the_POA ();
    
    PortableServer::POA the_port_POA ();
  };
};