org.jboss.dependency.spi
Interface ControllerStateModel

All Superinterfaces:
Iterable<ControllerState>
All Known Implementing Classes:
AbstractController, AbstractKernelController, ScopedController, ScopedKernelController

public interface ControllerStateModel
extends Iterable<ControllerState>

ControllerState model. Helper/util methods.

Author:
Ales Justin

Method Summary
 ControllerState getNextState(ControllerState state)
          Get next state from state param or null if state param is the last.
 ControllerState getPreviousState(ControllerState state)
          Get previous state from state param or null if state param is the first.
 boolean isAfterState(ControllerState state, ControllerState reference)
          Is state param after reference state param.
 boolean isBeforeState(ControllerState state, ControllerState reference)
          Is state param before reference state param.
 ListIterator<ControllerState> listIteraror()
          Get the list iterator.
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

listIteraror

ListIterator<ControllerState> listIteraror()
Get the list iterator. The list iterator cursor should be pointing to the last state. Since the usage of this list iterator is mostly to iterate over the states in reverted order.

Returns:
list iterator

getPreviousState

ControllerState getPreviousState(ControllerState state)
Get previous state from state param or null if state param is the first. Throw exception if state is not recognized.

Parameters:
state - the current state
Returns:
previous state

getNextState

ControllerState getNextState(ControllerState state)
Get next state from state param or null if state param is the last. Throw exception if state is not recognized.

Parameters:
state - the current state
Returns:
next state

isBeforeState

boolean isBeforeState(ControllerState state,
                      ControllerState reference)
Is state param before reference state param.

Parameters:
state - the state we are checking
reference - the state we are checking against
Returns:
true if state is before reference

isAfterState

boolean isAfterState(ControllerState state,
                     ControllerState reference)
Is state param after reference state param.

Parameters:
state - the state we are checking
reference - the state we are checking against
Returns:
true if state is after reference


Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.