JBoss Community

Detyped Representation of the AS 7 Management Model

new comment by Brian Stansberry View all comments on this document

In the initial version of this article, the "type" and "value-type" handling isn't right.

 

First, I don't think we should use org.jboss.dmr.ModelType for any enumerated values, as the purpose is different. ModelType gives information to someone with a ref to a ModelNode to let them determine the structure of the node.

 

A small improvement would be to make type one of an enumerated list of values: BIG_DECIMAL, BIG_INTEGER, BOOLEAN, BYTES, DOUBLE, INT, LIST, LONG, MAP (new), PROPERTY, STRING, or a complex structure detailing the fields and values of a non-simple-map kinds of dmr OBJECTs. The value-type is used with LIST, MAP, PROPERTY to describe the type list elements & map/property values, and is itself either on of the enumerated values or a complex structure.

 

This breaks down, of course, if value-type is itself LIST, MAP or PROPERTY.

 

These type descriptions will also break down for dynamic data; e.g. the reply-properties value for a generic operation like some generic "readAttribute" with param "attribute-name" => "foo". The description of the return value depends on the value of "attribute-name".

 

Similar issue exists with multi-step operations, where the structure of the return value incorporates multiple values, or with domain or host level operations, where the return value includes results from a dynamic set of hosts and servers.