Package org.openjdk.jmc.common.item
Class PersistableItemFilter
- java.lang.Object
-
- org.openjdk.jmc.common.item.PersistableItemFilter
-
- All Implemented Interfaces:
IStateful
,IItemFilter
- Direct Known Subclasses:
ItemFilters.AttributeFilter
,ItemFilters.Composite
,ItemFilters.Not
,ItemFilters.Type
,ItemFilters.TypeMatches
public abstract class PersistableItemFilter extends Object implements IItemFilter, IStateful
Simple provisional persistence implementation for item filter. It has a few issues of various importance:- Like the current filter variants, it is non-canonical: MEMBER_OF can be rewritten as an OR of EQUALs, and similarly with the TYPE variants. INTERVAL can be expressed as an AND of LESS and MORE. (Apart from the API omission that closedness cannot by expressed in the latter two.)
- The current XML structure isn't as simple as it could be, and not easily verifiable by a simple schema.
- Delegation responsibilities to sub-filters and content types for persisting and parsing aren't very clear.
- Behavior with unpersistable sub-filters and content types is somewhat unspecified.
- Content types for values use the internal legacy ad-hoc identifiers. It would be better to use well specified (standardized) expressions where possible (units/kind-of-quantities, Java classes, as in "JMX 2.0").
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PersistableItemFilter.Kind
-
Field Summary
Fields Modifier and Type Field Description protected PersistableItemFilter.Kind
kind
-
Constructor Summary
Constructors Modifier Constructor Description protected
PersistableItemFilter(PersistableItemFilter.Kind kind)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected static void
putValueType(IWritableState memento, ContentType<?> contentType)
static IItemFilter
readFrom(IState memento)
protected abstract void
saveArgs(IWritableState memento)
void
saveTo(IWritableState memento)
Saves the state for this object into a state object.String
toString()
String
toString(String argumentName, Object value)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.openjdk.jmc.common.item.IItemFilter
getPredicate
-
-
-
-
Field Detail
-
kind
protected final PersistableItemFilter.Kind kind
-
-
Constructor Detail
-
PersistableItemFilter
protected PersistableItemFilter(PersistableItemFilter.Kind kind)
-
-
Method Detail
-
saveTo
public final void saveTo(IWritableState memento)
Description copied from interface:IStateful
Saves the state for this object into a state object.
-
saveArgs
protected abstract void saveArgs(IWritableState memento)
-
putValueType
protected static void putValueType(IWritableState memento, ContentType<?> contentType)
-
readFrom
public static IItemFilter readFrom(IState memento)
-
-