KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > openccm > ir3 > HomeOperationBase


1 /*====================================================================
2
3 OpenCCM: The Open CORBA Component Model Platform
4 Copyright (C) 2000-2004 INRIA & USTL - LIFL - GOAL
5 Contact: openccm@objectweb.org
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 USA
21
22 Initial developer(s): Philippe Merle.
23 Contributor(s): Mathieu Vadet, Christophe Demarey.
24
25 ====================================================================*/

26
27 package org.objectweb.openccm.ir3;
28
29 // Package dependencies
30
import org.omg.CORBA.*;
31
32 /**
33  * Base class for FactoryDef_impl and FinderDef_impl classes.
34  *
35  * @author <a=href="Philippe.Merle@lifl.fr">Philippe Merle</a>
36  * <a=href="Mathieu.Vadet@lifl.fr">Mathieu Vadet</a>
37  *
38  * @version 0.3
39  */

40
41 public class HomeOperationBase
42        extends OperationDef_impl
43 {
44     // ==================================================================
45
//
46
// Constructor.
47
//
48
// ==================================================================
49

50     /**
51      * TODO
52      */

53     public
54     HomeOperationBase(IFR ifr,
55                       HomeDef_impl home)
56     {
57         // call the OperationDef_impl constructor.
58
super(ifr, home, false);
59
60         // force the operation mode.
61
mode_ = OperationMode.OP_NORMAL;
62
63         // force the operation contexts.
64
contexts_ = new String JavaDoc[0];
65     }
66
67     // ==================================================================
68
//
69
// Internal state.
70
//
71
// ==================================================================
72

73     // ==================================================================
74
//
75
// Internal methods.
76
//
77
// ==================================================================
78

79     /**
80      * Obtain the component type managed by the home.
81      */

82     protected ComponentDef_ref
83     getComponentManagedByHome()
84     {
85         // delegate to the HomeDef implementation.
86
return ((HomeDef_impl)container_).managed_component_;
87     }
88
89     // ==================================================================
90
//
91
// For CORBA::OperationDef interface.
92
//
93
// ==================================================================
94

95     /**
96      * IDL:omg.org/CORBA/OperationDef/result:1.0
97      */

98     public TypeCode
99     result()
100     {
101         // delegate to the ComponentDef implementation.
102
return getComponentManagedByHome().recursiveType();
103     }
104
105     /**
106      * IDL:omg.org/CORBA/OperationDef/result_def:1.0
107      */

108     public IDLType
109     result_def()
110     {
111         // delegate to the ComponentDef reference.
112
return getComponentManagedByHome().asComponentDef();
113     }
114
115     /**
116      * IDL:omg.org/CORBA/OperationDef/result_def:1.0
117      */

118     public void
119     result_def(IDLType val)
120     {
121         // Do nothing!;
122
}
123
124     /**
125      * IDL:omg.org/CORBA/OperationDef/mode:1.0
126      */

127     public void
128     mode(OperationMode val)
129     {
130         // Do nothing!
131
}
132
133     /**
134      * IDL:omg.org/CORBA/OperationDef/contexts:1.0
135      */

136     public void
137     contexts(String JavaDoc[] val)
138     {
139          // Do nothing!
140
}
141 }
142
Popular Tags