public abstract class AbstractStateContext extends Object implements StateContext
StateContext
which uses a Map
to store the
attributes.Constructor and Description |
---|
AbstractStateContext() |
Modifier and Type | Method and Description |
---|---|
Object |
getAttribute(Object key)
Returns the value of the attribute with the specified key or
null if not found. |
protected Map<Object,Object> |
getAttributes() |
State |
getCurrentState() |
void |
setAttribute(Object key,
Object value)
Sets the value of the attribute with the specified key.
|
void |
setCurrentState(State state)
Sets the current
State . |
String |
toString() |
public Object getAttribute(Object key)
null
if not found.getAttribute
in interface StateContext
key
- the key.null
.public State getCurrentState()
getCurrentState
in interface StateContext
State
. This is only meant for internal use.public void setAttribute(Object key, Object value)
setAttribute
in interface StateContext
key
- the key.value
- the value.public void setCurrentState(State state)
State
. This is only meant for internal use.
Don't call it directly!setCurrentState
in interface StateContext
state
- the new current State
.Copyright © 2004–2021 Apache MINA Project. All rights reserved.