KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > openccm > plugins > transaction > controller > TransactionControllerHome


1 /*====================================================================
2
3 OpenCCM: The Open CORBA Component Model Platform
4 Copyright (C) 2001-2002 USTL - LIFL - GOAL
5 Contact: openccm-team@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): Mathieu Vadet.
23 Contributor(s): ______________________________________.
24
25 ====================================================================*/

26
27 package org.objectweb.openccm.plugins.transaction.controller;
28
29 /**
30  * This interface ??????.
31  *
32  * @author <a=href="Mathieu.Vadet@lifl.fr">Mathieu Vadet</a>
33  *
34  * @version 0.3
35  */

36
37 public class TransactionControllerHome
38        extends org.omg.CORBA.LocalObject JavaDoc
39        implements org.objectweb.openccm.Containers.SystemHome
40 {
41     // ==================================================================
42
//
43
// Internal state.
44
//
45
// ==================================================================
46

47     // ==================================================================
48
//
49
// Constructor.
50
//
51
// ==================================================================
52

53     /**
54      ** The constructor.
55      **
56      **/

57     protected
58     TransactionControllerHome()
59     {
60     }
61
62     // ==================================================================
63
//
64
// Internal methods.
65
//
66
// ==================================================================
67

68     // ==================================================================
69
//
70
// Public methods for the SystemHome interface.
71
//
72
// ==================================================================
73

74     //
75
// IDL:goal.lifl.fr/OpenCCM/Containers/SystemHome/create:1.0
76
//
77
/**
78      **
79      **/

80     public org.objectweb.openccm.Containers.SystemComponent
81     create_component(org.objectweb.openccm.Containers.PropertySet config)
82     {
83                 org.objectweb.openccm.Containers.StringProperty _property;
84                 try
85                         {
86                                 _property = config.get_as_string("OTS_Policy");
87                         } catch(org.objectweb.openccm.Containers.UnknownProperty ex) {
88                                 return null;
89                         } catch(org.objectweb.openccm.Containers.BadPropertyKind ex) {
90                                 return null;
91                         }
92
93       if ( _property.value().equals("NOT_SUPPORTED"))
94                     return new NotSupportedController();
95       else if ( _property.value().equals("REQUIRED"))
96                     return new RequiredController();
97       else if ( _property.value().equals("SUPPORTS"))
98                     return new SupportsController();
99       else if ( _property.value().equals("REQUIRES_NEW"))
100                     return new RequiresNewController();
101       else if ( _property.value().equals("MANDATORY"))
102                     return new MandatoryController();
103       else if ( _property.value().equals("NEVER"))
104                     return new NeverController();
105       else
106                     return null;
107     }
108
109     // ==================================================================
110
//
111
// Public methods for the SystemComponent interface.
112
//
113
// ==================================================================
114

115     // ==================================================================
116
//
117
// Public methods for the Configuration interface.
118
//
119
// ==================================================================
120

121     //
122
// IDL:goal.lifl.fr/OpenCCM/Containers/Configuration/configure:1.0
123
//
124
/**
125      **
126      **/

127     public void
128     configure(org.objectweb.openccm.Containers.PropertySet config)
129     throws org.objectweb.openccm.Containers.ConfigurationFailed
130     {
131     }
132
133     // ==================================================================
134
//
135
// Public static methods.
136
//
137
// ==================================================================
138

139     /**
140      ** Callback - no parameters
141      **/

142     public static TransactionControllerHome
143     create()
144     {
145         return new TransactionControllerHome();
146     }
147
148     // ==================================================================
149
//
150
// Public methods.
151
//
152
// ==================================================================
153
}
154
155
Popular Tags