Brooklyn

org.osgi.jmx
[Java] Class Item

java.lang.Object
  org.osgi.jmx.Item

public class Item

The item class enables the definition of open types in the appropriate interfaces. This class contains a number of methods that make it possible to create open types for javax.management.openmbean.CompositeType, javax.management.openmbean.TabularType, and javax.management.openmbean.ArrayType. The normal creation throws a checked exception, making it impossible to use them in a static initializer. The constructors are also not very suitable for static construction. An Item instance describes an item in a Composite Type. It groups the triplet of name, description, and Open Type. These Item instances allows the definitions of an item to stay together.

Immutable:
ALED/BROOKLYN: This is a verbatim copy of from org.osgi.jmx.JmxConstants, to avoid pulling in the dependency org.osgi.enterprise-4.2.0, and its chain of dependencies. The only difference is this comment.
Version:
\$Revision: 8482 \$


Constructor Summary
Item(java.lang.String name, java.lang.String description, javax.management.openmbean.OpenType type, java.lang.String... restrictions)

Create a triple of name, description, and type.

 
Method Summary
static javax.management.openmbean.ArrayType arrayType(int dim, javax.management.openmbean.OpenType elementType)

Return a new Array Type.

static javax.management.openmbean.CompositeType compositeType(java.lang.String name, java.lang.String description, Item... items)

Create a Composite Type

static javax.management.openmbean.CompositeType extend(javax.management.openmbean.CompositeType parent, java.lang.String name, java.lang.String description, Item... items)

Extend a Composite Type by adding new items.

static javax.management.openmbean.TabularType tabularType(java.lang.String name, java.lang.String description, javax.management.openmbean.CompositeType rowType, java.lang.String... index)

Create a Tabular Type.

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Constructor Detail

Item

public Item(java.lang.String name, java.lang.String description, javax.management.openmbean.OpenType type, java.lang.String... restrictions)
Create a triple of name, description, and type. This triplet is used in the creation of a Composite Type.
Parameters:
name - The name of the item.
description - The description of the item.
type - The Open Type of this item.
restrictions - Ignored, contains list of restrictions


 
Method Detail

arrayType

public static javax.management.openmbean.ArrayType arrayType(int dim, javax.management.openmbean.OpenType elementType)
Return a new Array Type.
Parameters:
dim - The dimension
elementType - The element type
Returns:
A new Array Type


compositeType

public static javax.management.openmbean.CompositeType compositeType(java.lang.String name, java.lang.String description, Item... items)
Create a Composite Type
throws:
RuntimeException when the Tabular Type throws an OpenDataException
Parameters:
name - The name of the Tabular Type.
description - The description of the Tabular Type.
items - The items that describe the composite type.
Returns:
a new Composite Type


extend

public static javax.management.openmbean.CompositeType extend(javax.management.openmbean.CompositeType parent, java.lang.String name, java.lang.String description, Item... items)
Extend a Composite Type by adding new items. Items can override items in the parent type.
throws:
RuntimeException when an OpenDataException is thrown
Parameters:
parent - The parent type, can be null
name - The name of the type
description - The description of the type
items - The items that should be added/override to the parent type
Returns:
A new Composite Type that extends the parent type


tabularType

public static javax.management.openmbean.TabularType tabularType(java.lang.String name, java.lang.String description, javax.management.openmbean.CompositeType rowType, java.lang.String... index)
Create a Tabular Type.
throws:
RuntimeException when the Tabular Type throws an OpenDataException
Parameters:
name - The name of the Tabular Type.
description - The description of the Tabular Type.
rowType - The Open Type for a row
index - The names of the items that form the index .
Returns:
A new Tabular Type composed from the parameters.


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.