|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.util.JBossObject
org.jboss.dependency.plugins.AbstractController
public class AbstractController
Abstract controller.
Field Summary | |
---|---|
protected Map |
allContexts
All contexts by name Map |
protected Map |
contextsByState
The contexts by state Map |
protected Set |
errorContexts
The error contexts Set |
protected Set |
installing
The contexts that are currently being installed |
protected boolean |
onDemandEnabled
Whether an on demand context has been enabled |
protected List |
states
The states in order List |
Fields inherited from class org.jboss.util.JBossObject |
---|
hashCode, log, toString |
Constructor Summary | |
---|---|
AbstractController()
Create an abstract controller |
Method Summary | |
---|---|
void |
addState(ControllerState state,
ControllerState before)
Add a state. |
protected boolean |
advance(ControllerContext context)
Whether we should advance the context |
void |
change(ControllerContext context,
ControllerState state)
Change a context to the given state |
protected void |
change(ControllerContext context,
ControllerState state,
boolean trace)
Change a context's state |
void |
enableOnDemand(ControllerContext context)
Enable an on demand context |
protected void |
enableOnDemand(ControllerContext context,
boolean trace)
Enable an on demand context |
ControllerContext |
getContext(Object name,
ControllerState state)
Get a context |
ControllerContext |
getInstalledContext(Object name)
Get an installed context |
Set |
getNotInstalled()
Get the contexts not installed |
List |
getStates()
Get the states. |
protected boolean |
incrementState(ControllerContext context,
boolean trace)
Increment state |
void |
install(ControllerContext context)
Install a context |
protected void |
install(ControllerContext context,
boolean trace)
Install a context |
protected void |
install(ControllerContext context,
ControllerState fromState,
ControllerState toState)
Install a context |
protected void |
resolveContexts(boolean trace)
Resolve unresolved contexts |
protected boolean |
resolveContexts(ControllerState fromState,
ControllerState toState,
boolean trace)
Resolve contexts |
protected Set |
resolveContexts(Set contexts,
ControllerState state,
boolean trace)
Resolve contexts |
protected void |
uninstall(ControllerContext context,
ControllerState fromState,
ControllerState toState)
Uninstall a context |
ControllerContext |
uninstall(Object name)
Uninstall a context |
protected void |
uninstallContext(ControllerContext context,
boolean trace)
Uninstall a context |
protected void |
uninstallContext(ControllerContext context,
ControllerState toState,
boolean trace)
Uninstall a context |
Methods inherited from class org.jboss.util.JBossObject |
---|
cacheGetHashCode, cacheToString, clone, equals, flushJBossObjectCache, getClassShortName, getHashCode, hashCode, list, notEqual, toShortString, toShortString, toString, toString, toStringImplementation |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.jboss.util.JBossInterface |
---|
clone, toShortString, toShortString |
Field Detail |
---|
protected List states
protected Map allContexts
protected Map contextsByState
protected Set errorContexts
protected Set installing
protected boolean onDemandEnabled
Constructor Detail |
---|
public AbstractController() throws Exception
Exception
- for any errorMethod Detail |
---|
public void addState(ControllerState state, ControllerState before)
Controller
addState
in interface Controller
state
- the state to addbefore
- the state to add before or null to add to the endpublic ControllerContext getContext(Object name, ControllerState state)
Controller
getContext
in interface Controller
name
- the name of the componentstate
- the state (pass null for any state)
public ControllerContext getInstalledContext(Object name)
Controller
getInstalledContext
in interface Controller
name
- the name of the component
public Set getNotInstalled()
Controller
getNotInstalled
in interface Controller
public List getStates()
Controller
getStates
in interface Controller
public void install(ControllerContext context) throws Throwable
Controller
install
in interface Controller
context
- the context
Throwable
- for any errorpublic void change(ControllerContext context, ControllerState state) throws Throwable
Controller
change
in interface Controller
context
- the contextstate
- the state
Throwable
- for any errorpublic void enableOnDemand(ControllerContext context) throws Throwable
Controller
enableOnDemand
in interface Controller
context
- the context
Throwable
- for any errorpublic ControllerContext uninstall(Object name)
Controller
uninstall
in interface Controller
name
- the name of the component
protected void install(ControllerContext context, boolean trace) throws Throwable
context
- the contexttrace
- whether trace is enabled
Throwable
- for any errorprotected void change(ControllerContext context, ControllerState state, boolean trace) throws Throwable
context
- the contextstate
- the required statetrace
- whether trace is enabled
Throwable
- for any errorprotected void enableOnDemand(ControllerContext context, boolean trace) throws Throwable
context
- the contexttrace
- whether trace is enabled
Throwable
- for any errorprotected boolean incrementState(ControllerContext context, boolean trace)
context
- the contexttrace
- whether trace is enabled
protected void resolveContexts(boolean trace)
trace
- whether trace is enabledprotected boolean resolveContexts(ControllerState fromState, ControllerState toState, boolean trace)
fromState
- the from statetoState
- the to statetrace
- whether trace is enabled
protected Set resolveContexts(Set contexts, ControllerState state, boolean trace)
contexts
- the contextsstate
- the statetrace
- whether trace is enabled
protected void uninstallContext(ControllerContext context, ControllerState toState, boolean trace)
context
- the context to uninstalltoState
- the target statetrace
- whether trace is enabledprotected void uninstallContext(ControllerContext context, boolean trace)
context
- the context to uninstalltrace
- whether trace is enabledprotected void install(ControllerContext context, ControllerState fromState, ControllerState toState) throws Throwable
context
- the contextfromState
- the from statetoState
- the toState
Throwable
- for any errorprotected void uninstall(ControllerContext context, ControllerState fromState, ControllerState toState)
context
- the contextfromState
- the from statetoState
- the to stateprotected boolean advance(ControllerContext context)
context
- the context
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |