|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Progressor
Brillien represents the probelms of real world as a free communications' flow. Components have 3 roles basically: start, receive communication and alter during communications This interface define all state management behaviors which belongs to altering part of its roles. Every components has a logical state codomain describing the possible being state. It' logical level, responsible to add an abstraction layer to the communication flow, like coloring in dataflow languages. Multiple states could be present simultaneously. The amount of multiple state is defined ridigly and in unchangeably way, so a specific component has allways n state independently the vitality of a state in a specific communication. Another feature: every state altering could indicate new communication flows via the built-in notification system. Every Progressor take registration regarding a specific state flow and make notifications to the registered listeners in case of that altering
Method Summary | ||
---|---|---|
void |
addState(State state)
Adds a new State into the statemachine |
|
void |
changeState(State from,
State to)
Induces internal state change. |
|
|
getActualStates()
Gets actual states |
|
|
getPotentialStates()
Gets all potential states of a specific component |
|
StateDivision |
getStateDivision()
Gets the StateDivision object to check the validity of all state transitions |
|
boolean |
hasStateMachine()
|
|
void |
initStateMashine()
Initializes the state space of a Progressor |
|
boolean |
isInExitState()
Tells whether the given component's state space contains only exit states or not |
|
boolean |
isInState(State state)
Tells whether the given component's state space contains the given state or not |
|
boolean |
isInValidStates()
Tells whether this component's state space is convenient for a given scope or not |
|
void |
panic(String message)
Makes this Progressor to panic. |
|
void |
registerStateChangeNotification(State state,
String recipient,
String recipientApiVersion)
Any Sensor object can register to a specific state modification |
|
void |
removeState(State state)
Removes a State from the statemachine |
|
void |
setStateDivision(StateDivision stateDivision)
Sets the StateDivision object to check the validity of all state transitions |
|
void |
unregisterStateChangeNotification(State state,
String recipient,
String recipientApiVersion)
Any Sensor object can unregister from a specific state altering takes place |
Method Detail |
---|
boolean hasStateMachine()
void initStateMashine()
<T extends State> Collection<T> getPotentialStates()
boolean isInValidStates()
boolean isInExitState()
boolean isInState(State state)
<T extends State> Collection<T> getActualStates()
StateDivision getStateDivision()
void setStateDivision(StateDivision stateDivision)
stateDivision
- StateDevision objectvoid changeState(State from, State to) throws BrillienException
from
- actual state to be changedto
- new state
BrillienException
- in any case of errorvoid addState(State state) throws BrillienException
BrillienException
- in any case of errorvoid removeState(State state) throws BrillienException
BrillienException
- in any case of errorvoid registerStateChangeNotification(State state, String recipient, String recipientApiVersion) throws BrillienException
state
- the state to be listenedrecipient
- the entity who need to notified when a notification would be sent induced by a state change
BrillienException
- in any error case LogicException is thrownvoid unregisterStateChangeNotification(State state, String recipient, String recipientApiVersion) throws BrillienException
state
- the state to be listenedrecipient
- the entity who need to notified when a notification would be sent induced by a state change
BrillienException
- in any error case LogicException is thrownvoid panic(String message)
message
- cause of the panic
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |