KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > openccm > Containers > Plugins > SingleCallController


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.Containers.Plugins;
28
29 /**
30  * This interface ??????.
31  *
32  * @author <a HREF="mailto:Mathieu.Vadet@lifl.fr">Mathieu Vadet</a>
33  *
34  * @version 0.3
35  */

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

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

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

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

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

74     // ==================================================================
75
//
76
// Public methods for the ActivationProtocol interface.
77
//
78
// ==================================================================
79

80     //
81
// IDL:goal.lifl.fr/OpenCCM/Containers/ActivationProtocol/preinvoke:1.0
82
//
83
/**
84      **
85      **/

86     public void
87     preinvoke(org.objectweb.openccm.Containers.ActivationContext ctx)
88     {
89         if (ctx.state()==org.objectweb.openccm.Containers.ActivationContext.DEACTIVATED)
90             ctx.state(org.objectweb.openccm.Containers.ActivationContext.ACTIVATED);
91         else
92         {
93             // there is a problem !!!
94
java.lang.String JavaDoc msg = "Component should not be activated in preinvoke operation using a single call strategy";
95             throw new java.lang.Error JavaDoc(msg);
96         }
97     }
98
99     //
100
// IDL:goal.lifl.fr/OpenCCM/Containers/ActivationProtocol/postinvoke:1.0
101
//
102
/**
103      **
104      **/

105     public void
106     postinvoke(org.objectweb.openccm.Containers.ActivationContext ctx)
107     {
108         if (ctx.state()==org.objectweb.openccm.Containers.ActivationContext.ACTIVATED)
109             ctx.state(org.objectweb.openccm.Containers.ActivationContext.DEACTIVATED);
110     }
111
112     // ==================================================================
113
//
114
// Public methods for the SystemComponent interface.
115
//
116
// ==================================================================
117

118     // ==================================================================
119
//
120
// Public methods for the Configuration interface.
121
//
122
// ==================================================================
123

124     //
125
// IDL:goal.lifl.fr/OpenCCM/Containers/Configuration/configure:1.0
126
//
127
/**
128      **
129      **/

130     public void
131     configure(org.objectweb.openccm.Containers.PropertySet config)
132     throws org.objectweb.openccm.Containers.ConfigurationFailed
133     {
134     }
135 }
136
Popular Tags