– Map of String (the attribute name) to complex structure – the configuration attributes attributes
available in this portion of the model. See below for the representation of each attribute.
– Map of String (the operation name) to complex structure – the operations that can be operations
targetted at this address. See below for the representation of each operation.
– Map of String (the type of child) to complex structure – the relationship of this portion of children
the model to other addressable portions of the model. See below for the representation of each child relationship.
– boolean – indicates whether this portion of the model can store an XML head-comment-allowed
comment that would be written in the persistent form of the model (e.g. domain.xml) before the start of the XML element that represents this portion of the model. This item is optional, and if not present defaults to true. (Note: storing XML comments in the in-memory model is not currently supported. This description key is for future use.)
– boolean – similar to , but indicates whether a
tail-comment-allowed head-comment-allowed
comment just before the close of the XML element is supported. A tail comment can only be supported if the element has child elements, in which case a comment can be inserted between the final child element and the element's closing tag. This item is optional, and if not present defaults to true. (Note: storing XML comments in the in-memory model is not currently supported. This
description key is for future use.) For example:
{
"description => "A manageable resource", "tail-comment-allowed" => false,
"attributes" => { "foo" => {
.... details of attribute foo }
},
"operations" => { "start" => {
.... details of the start operation }
},
"children" => { "bar" => {
.... details of the relationship with children of type "bar" }
} }
Description of an Attribute
An attribute is a portion of the management model that is not directly addressable. Instead, it is conceptually a property of an addressable management resource. For each attribute in the model, the following
JBoss Community Documentation Page 177 of 660 – String – text description of the attribute
description
– – the type of the attribute value. One of the enum values type org.jboss.dmr.ModelType
BIG_DECIMAL, BIG_INTEGER, BOOLEAN, BYTES, DOUBLE, INT, LIST, LONG, OBJECT, PROPERTY, STRING. Most of these are self-explanatory. An OBJECT will be represented in the detyped model as a map of string keys to values of some other legal type, conceptually similar to a
. A PROPERTY is a single key/value pair, javax.management.openmbean.CompositeData
where the key is a string, and the value is of some other legal type.
– ModelType or complex structure – Only present if type is LIST or OBJECT. If all value-type
elements in the LIST or all the values of the OBJECT type are of the same type, this will be one of the ModelType enums BIG_DECIMAL, BIG_INTEGER, BOOLEAN, BYTES, DOUBLE, INT, LONG, STRING. Otherwise, value-type will detail the structure of the attribute value, enumerating the value's fields and the type of their value.
– boolean – indicates whether the value of the attribute may be of type expressions-allowed
, instead of its standard type (see and above for
ModelType.EXPRESSION type value-type
discussion of an attribute's standard type.) A value of ModelType.EXPRESSION contains a system-property substitution expression that the server will resolve against the server-side system property map before using the value. For example, an attribute named max-threads may have an expression value of ${example.pool.max-threads:10} instead of just 10. Default value if not present is false.
– boolean – true if the attribute will always exist in a representation of its portion of the required
model; false if it may not (implying a null value.) If not present, true is the default.
– String – Either "configuration" or "runtime". If "configuration", the attribute's value is stored storage
as part of the persistent configuration (e.g. in domain.xml, host.xml or standalone.xml.) If "runtime" the attribute's value is not stored in the persistent configuration; the value only exists as long as the resource is running.
– String – One of "read-only", "read-write" or "metric". Whether an attribute value can access-type
be written, or can only read. A "metric" is a read-only attribute whose value is not stored in the persistent configuration, and whose value may change due to activity on the server. If an attribute is "read-write", the resource will expose an operation named "write-attribute" whose "name" parameter will accept this attribute's name and whose "value" parameter will accept a valid value for this attribute. That operation will be the standard means of updating this attribute's value.
– String – One of "no-services", "all-services", "resource-services" or "jvm". restart-required
Only relevant to attributes whose access-type is read-write. Indicates whether execution of a write-attribute operation whose name parameter specifies this attribute requires a restart of services (or an entire JVM) in order for the change to take effect in the runtime . See discussion of "Applying
" below. Default value is "no-services". Updates to Runtime Services
– List of string – Indicates an exclusive relationship between attributes. If this alternatives
attribute is defined, the other attributes listed in this descriptor's value should be undefined (even if their required descriptor says true; i.e. the presence of this attribute satisfies the requirement.) Default is undefined; i.e. this does not apply to most attributes.
– List of string – Indicates that if this attribute has a value (other than undefined), the other requires
attributes listed in this descriptor's value must also have a value, even if their required descriptor says false. This would typically be used in conjunction with alternatives. For example, attributes "a" and "b" are required, but are alternatives to each other; "c" and "d" are optional. But "b" requires "c" and "d", so if "b" is used, "c" and "d" must also be defined. Default is undefined; i.e. this does not apply to most attributes.
– boolean – indicates whether the model can store an XML comment that head-comment-allowed
would be written in the persistent form of the model (e.g. domain.xml) before the start of the XML element that represents this attribute. This item is optional, and if not present defaults to false. (This is a different default from what is used for an entire management resource, since model attributes often map to XML attributes, which don't allow comments.) (Note: storing XML comments in the in-memory model is not currently supported. This description key is for future use.)
– boolean – similar to head-comment-allowed, but indicates whether a tail-comment-allowed
comment just before the close of the XML element is supported. A tail comment can only be supported if the element has child elements, in which case a comment can be inserted between the final child element and the element's closing tag. This item is optional, and if not present defaults to false. (This is a different default from what is used for an entire management resource, since model attributes often map to XML attributes, which don't allow comments.) (Note: storing XML comments in the in-memory model is not currently supported. This description key is for future use.)
arbitrary key/value pairs that further describe the attribute value, e.g. "max" => 2. See "Arbitrary " below.
Descriptors Some examples:
"foo" => {
"description" => "The foo", "type" => INT,
"max" => 2 }
"bar" => {
"description" => "The bar", "type" => OBJECT, "value-type" => { "size" => INT, "color" => STRING } }
Description of an Operation
A management resource may have operations associated with it. The description of an operation will include the following information:
JBoss Community Documentation Page 179 of 660 – String – the name of the operation
operation-name
– String – text description of the operation description
– Map of String to complex structure – description of the parameters of the request-properties
operation. Keys are the names of the parameters, values are descriptions of the parameter value types. See below for details on the description of parameter value types.
– complex structure, or empty – description of the return value of the operation, reply-properties
with an empty node meaning void. See below for details on the description of operation return value types.
– String – One of "no-services", "all-services", "resource-services" or "jvm". restart-required
Indicates whether the operation makes a configuration change that requires a restart of services (or an entire JVM) in order for the change to take effect in the runtime. See discussion of "Applying
" below. Default value is "no-services". Updates to Runtime Services