KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > dependency > spi > ControllerContext


1 /*
2 * JBoss, Home of Professional Open Source
3 * Copyright 2005, JBoss Inc., and individual contributors as indicated
4 * by the @authors tag. See the copyright.txt in the distribution for a
5 * full listing of individual contributors.
6 *
7 * This is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License as
9 * published by the Free Software Foundation; either version 2.1 of
10 * the License, or (at your option) any later version.
11 *
12 * This software 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 software; if not, write to the Free
19 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21 */

22 package org.jboss.dependency.spi;
23
24 import org.jboss.util.JBossInterface;
25
26 /**
27  * Information about a context.
28  *
29  * @author <a HREF="adrian@jboss.com">Adrian Brock</a>
30  * @version $Revision: 37459 $
31  */

32 public interface ControllerContext extends JBossInterface
33 {
34    /**
35     * Get the name
36     *
37     * @return the name
38     */

39    Object JavaDoc getName();
40
41    /**
42     * Get the dependency information
43     *
44     * @return the dependency information
45     */

46    DependencyInfo getDependencyInfo();
47    
48    /**
49     * Get any target
50     *
51     * @return the target
52     */

53    Object JavaDoc getTarget();
54    
55    /**
56     * Get the controller
57     *
58     * @return the controller
59     */

60    Controller getController();
61    
62    /**
63     * Set the controller
64     *
65     * @param controller the controller
66     */

67    void setController(Controller controller);
68
69    /**
70     * Install
71     *
72     * @param fromState the old state
73     * @param toState the new state
74     * @throws Throwable for any error
75     */

76    void install(ControllerState fromState, ControllerState toState) throws Throwable JavaDoc;
77
78    /**
79     * Uninstall
80     *
81     * @param fromState the old state
82     * @param toState the new state
83     */

84    void uninstall(ControllerState fromState, ControllerState toState);
85
86    /**
87     * Get the state
88     *
89     * @return the state
90     */

91    ControllerState getState();
92
93    /**
94     * Get the required state
95     *
96     * @return the required state
97     */

98    ControllerState getRequiredState();
99
100    /**
101     * Set the required state
102     *
103     * @param state the required state
104     */

105    void setRequiredState(ControllerState state);
106
107    /**
108     * Get the mode
109     *
110     * @return the mode
111     */

112    ControllerMode getMode();
113
114    /**
115     * Set the mode
116     *
117     * @param mode the mode
118     */

119    void setMode(ControllerMode mode);
120    
121    /**
122     * Get the error
123     *
124     * @return the error
125     */

126    Throwable JavaDoc getError();
127    
128    /**
129     * Set the error
130     *
131     * @param error the error
132     */

133    void setError(Throwable JavaDoc error);
134 }
135
Popular Tags