Package org.openjdk.jmc.common
Interface IWritableState
-
- All Known Implementing Classes:
StateElementWriter
,StatefulState.StatefulStateWriter
public interface IWritableState
A state container which can be written to. It is an hierarchical structure that can contain named child states. Actual data values are stored in named attributes for each state node.This interface is a companion to
IState
which handles reading of state information.IStateful
can be used to mark a class that knows how to store its state in an IWritableState instance.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IWritableState
createChild(java.lang.String type)
Creates a new child node.void
putString(java.lang.String key, java.lang.String value)
Stores a named attribute value.
-
-
-
Method Detail
-
createChild
IWritableState createChild(java.lang.String type)
Creates a new child node. Multiple nodes of the same type are permitted.- Parameters:
type
- node type- Returns:
- a new child node
-
putString
void putString(java.lang.String key, java.lang.String value)
Stores a named attribute value. Multiple values with the same key is not supported. If called multiple times with the same key then only the latest value should be kept.- Parameters:
key
- attribute keyvalue
- attribute value
-
-