org.jboss.dependency.spi
Interface Controller

All Superinterfaces:
Cloneable, org.jboss.util.JBossInterface
All Known Implementing Classes:
AbstractController

public interface Controller
extends org.jboss.util.JBossInterface

A controller.

The controller is the core component for keeping track of contexts to make sure the configuration and lifecycle are done in the correct order including dependencies and classloading considerations.

Version:
$Revision: 1.3 $
Author:
Adrian Brock

Method Summary
 void addState(ControllerState state, ControllerState before)
          Add a state.
 void change(ControllerContext context, ControllerState state)
          Change a context to the given state
 void enableOnDemand(ControllerContext context)
          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.
 void install(ControllerContext context)
          Install a context
 ControllerContext uninstall(Object name)
          Uninstall a context
 
Methods inherited from interface org.jboss.util.JBossInterface
clone, toShortString, toShortString
 

Method Detail

install

void install(ControllerContext context)
             throws Throwable
Install a context

Parameters:
context - the context
Throws:
Throwable - for any error

change

void change(ControllerContext context,
            ControllerState state)
            throws Throwable
Change a context to the given state

Parameters:
context - the context
state - the state
Throws:
Throwable - for any error

enableOnDemand

void enableOnDemand(ControllerContext context)
                    throws Throwable
Enable an on demand context

Parameters:
context - the context
Throws:
Throwable - for any error

uninstall

ControllerContext uninstall(Object name)
Uninstall a context

Parameters:
name - the name of the component
Returns:
the context

getContext

ControllerContext getContext(Object name,
                             ControllerState state)
Get a context

Parameters:
name - the name of the component
state - the state (pass null for any state)
Returns:
the context

getInstalledContext

ControllerContext getInstalledContext(Object name)
Get an installed context

Parameters:
name - the name of the component
Returns:
the context

getNotInstalled

Set getNotInstalled()
Get the contexts not installed

Returns:
Set

addState

void addState(ControllerState state,
              ControllerState before)
Add a state.

Parameters:
state - the state to add
before - the state to add before or null to add to the end

getStates

List getStates()
Get the states.

Returns:
the states in order


Copyright © 2004 JBoss Inc. All Rights Reserved.