Class AbstractStateContext
java.lang.Object
org.apache.mina.statemachine.context.AbstractStateContext
- All Implemented Interfaces:
StateContext
- Direct Known Subclasses:
DefaultStateContext
Abstract
StateContext which uses a Map to store the
attributes.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute(Object key) Returns the value of the attribute with the specified key ornullif not found.voidsetAttribute(Object key, Object value) Sets the value of the attribute with the specified key.voidsetCurrentState(State state) Sets the currentState.toString()
-
Field Details
-
currentState
-
attributes
-
-
Constructor Details
-
AbstractStateContext
public AbstractStateContext()
-
-
Method Details
-
getAttribute
Returns the value of the attribute with the specified key ornullif not found.- Specified by:
getAttributein interfaceStateContext- Parameters:
key- the key.- Returns:
- the value or
null.
-
getCurrentState
- Specified by:
getCurrentStatein interfaceStateContext- Returns:
- the current
State. This is only meant for internal use.
-
setAttribute
Sets the value of the attribute with the specified key.- Specified by:
setAttributein interfaceStateContext- Parameters:
key- the key.value- the value.
-
setCurrentState
Sets the currentState. This is only meant for internal use. Don't call it directly!- Specified by:
setCurrentStatein interfaceStateContext- Parameters:
state- the new currentState.
-
getAttributes
-
toString
-