geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwo...@apache.org
Subject svn commit: r880663 - in /geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx/src/main/java/org/apache/geronimo/blueprint/jmx: BlueprintMetadataMBean.java BlueprintStateMBean.java
Date Mon, 16 Nov 2009 08:32:06 GMT
Author: rwonly
Date: Mon Nov 16 08:32:05 2009
New Revision: 880663

URL: http://svn.apache.org/viewvc?rev=880663&view=rev
Log:
split the original MBean to MetadataMBean and StateMBean, and also update some api definitions in them.

Added:
    geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx/src/main/java/org/apache/geronimo/blueprint/jmx/BlueprintMetadataMBean.java   (with props)
Modified:
    geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx/src/main/java/org/apache/geronimo/blueprint/jmx/BlueprintStateMBean.java

Added: geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx/src/main/java/org/apache/geronimo/blueprint/jmx/BlueprintMetadataMBean.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx/src/main/java/org/apache/geronimo/blueprint/jmx/BlueprintMetadataMBean.java?rev=880663&view=auto
==============================================================================
--- geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx/src/main/java/org/apache/geronimo/blueprint/jmx/BlueprintMetadataMBean.java (added)
+++ geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx/src/main/java/org/apache/geronimo/blueprint/jmx/BlueprintMetadataMBean.java Mon Nov 16 08:32:05 2009
@@ -0,0 +1,875 @@
+package org.apache.geronimo.blueprint.jmx;
+
+import java.io.IOException;
+
+import javax.management.openmbean.CompositeData;
+import javax.management.openmbean.CompositeType;
+import javax.management.openmbean.SimpleType;
+
+import org.osgi.jmx.Item;
+import org.osgi.jmx.JmxConstants;
+
+public interface BlueprintMetadataMBean {
+
+    /**
+     * The object name for this MBean.
+     */
+    String OBJECTNAME = JmxConstants.OSGI_COMPENDIUM+":service=blueprintMetadata,version=1.0";
+    
+    
+    ///////////////////////////////////////////////////////////////
+    // Define <value>'s CompositeType
+    ///////////////////////////////////////////////////////////////
+    
+    /**
+     * The key STRING_VALUE, used in {@link #STRING_VALUE_ITEM}.
+     */
+    String          STRING_VALUE            = "StringValue";
+    
+    /**
+     * The item containing the un-converted string representation of the value.
+     * The key is {@link #STRING_VALUE}, and the type is {@link SimpleType#STRING}.
+     */
+    Item            STRING_VALUE_ITEM       = new Item(
+                                                    STRING_VALUE, 
+                                                    "", 
+                                                    SimpleType.STRING);
+    
+    /**
+     * The key TYPE, used in {@link #TYPE_ITEM}.
+     */
+    String          TYPE                    = "Type";
+    
+    /**
+     * The item containing the name of the type to which the value should be converted.
+     * The key is {@link #TYPE}, and the type is {@link SimpleType#STRING}.
+     */
+    Item            TYPE_ITEM               = new Item(
+                                                    TYPE, 
+                                                    "", 
+                                                    SimpleType.STRING);
+    
+    /**
+     * The CompositeType for a ValueMetadata object. It contains the following items:
+     * <ul>
+     * <li>{@link #STRING_VALUE}</li>
+     * <li>{@link #TYPE}</li>
+     * </ul>
+     */
+    CompositeType   VALUE_METADATA_TYPE     = Item.compositeType(
+                                                    "ValueMetadata", 
+                                                    "", 
+                                                    STRING_VALUE_ITEM, 
+                                                    TYPE_ITEM);                  
+    
+    ///////////////////////////////////////////////////////////////
+    // Define <null>'s CompositeType
+    ///////////////////////////////////////////////////////////////  
+    
+    /**
+     * The CompositeType for a NullMetadata object.
+     */
+    CompositeType   NULL_METADATA_TYPE      = Item.compositeType("NullMetadata", "", new Item[0]);
+    
+    ///////////////////////////////////////////////////////////////
+    // Define <ref>'s CompositeType
+    ///////////////////////////////////////////////////////////////      
+    
+    /**
+     * The key COMPONENT_ID, used in {@link #COMPONENT_ID_ITEM}.
+     */
+    String          COMPONENT_ID            = "ComponentId";
+    
+    /**
+     * The item containing the component id to which the "ref" associates.
+     * The key is {@link #COMPONENT_ID}, and the type is {@link SimpleType#STRING}.
+     */
+    Item            COMPONENT_ID_ITEM       = new Item(
+                                                    COMPONENT_ID,
+                                                    "",
+                                                    SimpleType.STRING);
+    
+    /**
+     * The CompositeType for a RefMetadata object. It contains the following items:
+     * <ul>
+     * <li>{@link #COMPONENT_ID}</li>
+     * </ul>
+     */
+    CompositeType   REF_METADATA_TYPE       = Item.compositeType(
+                                                    "RefMetadata", 
+                                                    "", 
+                                                    COMPONENT_ID_ITEM);
+
+    ///////////////////////////////////////////////////////////////
+    // Define <idref>'s CompositeType
+    // COMPONENT_ID_ITEM defined in <ref>'s definition
+    ///////////////////////////////////////////////////////////////  
+    
+    /**
+     * The CompositeType for an IdRefMetadata object. It contains the following items:
+     * <ul>
+     * <li>{@link #COMPONENT_ID}</li>
+     * </ul>
+     */
+    CompositeType   ID_REF_METADATA_TYPE    = Item.compositeType(
+                                                    "IdRefMetadata", 
+                                                    "", 
+                                                    COMPONENT_ID_ITEM);
+    
+    ///////////////////////////////////////////////////////////////
+    // Define <entry>'s CompositeType, 
+    // used by MapMetadata, PropsMetadata, and Service properties
+    ///////////////////////////////////////////////////////////////    
+    
+    /**
+     * The key KEY, used in {@link #KEY_ITEM}.
+     */    
+    String          KEY                     = "Key";
+    
+    /**
+     * The item containing the key of an entry.
+     * The key is {@link #KEY}, and the type is {@link SimpleType#STRING}.
+     */
+    Item            KEY_ITEM                = new Item(
+                                                    KEY,
+                                                    "",
+                                                    Item.arrayType(1, SimpleType.BYTE));
+    
+    /**
+    * The key VALUE, used in {@link #VALUE_ITEM}.
+    */
+    String          VALUE                   = "Value";
+       
+    /**
+    * The item containing a value and this will be used by 
+    * BeanArgument, BeanProperty, MapEntry and CollectionMetadata.
+    * The key is {@link #VALUE}, and the type is {@link ArrayType}.
+    */
+    Item            VALUE_ITEM              = new Item(
+                                                   VALUE, 
+                                                   "", 
+                                                   Item.arrayType(1, SimpleType.BYTE));  
+
+    /**
+     * The CompositeType for a MapEntry object. It contains the following items:
+     * <ul>
+     * <li>{@link #KEY}</li>
+     * <li>{@link #VALUE}</li>
+     * </ul>
+     */
+    CompositeType   MAP_ENTRY_TYPE          = Item.compositeType(
+                                                   "MapEntry", 
+                                                   "", 
+                                                   KEY_ITEM,
+                                                   VALUE_ITEM);
+    
+    ///////////////////////////////////////////////////////////////
+    // Define <map>'s CompositeType
+    ///////////////////////////////////////////////////////////////
+    
+    /**
+     * The key ENTRIES, used in {@link #ENTRIES_ITEM}.
+     */
+    String          ENTRIES                 = "Entries";
+    
+    /**
+     * The item containing an array of entries
+     * The key is {@link #ENTRIES}, and the type is {@link ArrayType}.
+     */
+    Item            ENTRIES_ITEM            = new Item(
+                                                    ENTRIES,
+                                                    "",
+                                                    Item.arrayType(1, MAP_ENTRY_TYPE));
+    
+    /**
+     * The key KEY_TYPE, used in {@link #KEY_TYPE_ITEM}.
+     */
+    String          KEY_TYPE                = "KeyType";
+    
+    /**
+     * The item containing the key type of the entries.
+     * The key is {@link #KEY_TYPE}, and the type is {@link SimpleType#STRING}.
+     */
+    Item            KEY_TYPE_ITEM           = new Item(
+                                                    KEY_TYPE,
+                                                    "",
+                                                    SimpleType.STRING);
+    
+    /**
+     * The key VALUE_TYPE, used in {@link #VALUE_TYPE_ITEM}.
+     */
+    String          VALUE_TYPE              = "ValueType";
+    
+    /**
+     * The item containing the value type that the value should be
+     * The key is {@link #VALUE_TYPE}, and the type is {@link SimpleType#STRING}.
+     */
+    Item            VALUE_TYPE_ITEM         = new Item(
+                                                    VALUE_TYPE, 
+                                                    "", 
+                                                    SimpleType.STRING);
+    
+    /**
+     * The CompositeType for a MapMetadata object. It contains the following items:
+     * <ul>
+     * <li>{@link #ENTRIES}</li>
+     * <li>{@link #KEY_TYPE}</li>
+     * <li>{@link #VALUE_TYPE}</li>
+     * </ul>
+     */
+    CompositeType   MAP_METADATA_TYPE       = Item.compositeType(
+                                                    "MapMetadata", 
+                                                    "", 
+                                                    ENTRIES_ITEM,
+                                                    KEY_TYPE_ITEM,
+                                                    VALUE_TYPE_ITEM);
+    
+    ///////////////////////////////////////////////////////////////
+    // Define <props>'s CompositeType
+    // ENTRIES_ITEM defined in <map>'s definition
+    ///////////////////////////////////////////////////////////////
+
+    /**
+     * The CompositeType for a PropsMetadata object. It contains the following items:
+     * <ul>
+     * <li>{@link #ENTRIES}</li>
+     * </ul>
+     */
+    CompositeType   PROPS_METADATA_TYPE     = Item.compositeType(
+                                                    "PropsMetadata", 
+                                                    "", 
+                                                    ENTRIES_ITEM);
+    
+    ///////////////////////////////////////////////////////////////
+    // Define <collection>'s CompositeType
+    // VALUE_TYPE_ITEM defined in <map>'s definition
+    ///////////////////////////////////////////////////////////////   
+    
+    /**
+     * The key COLLECTION_CLASS, used in {@link #KEY_TYPE_ITEM}.
+     */
+    String          COLLECTION_CLASS        = "CollectionClass";    
+    
+    /**
+     * The item containing the type of this collection
+     * The key is {@link #COLLECTION_CLASS}, and the type is {@link SimpleType#STRING}.
+     */
+    Item            COLLECTION_CLASS_ITEM   = new Item(
+                                                    COLLECTION_CLASS,
+                                                    "",
+                                                    SimpleType.STRING);
+    
+    /**
+     * The key VALUES, used in {@link #VALUES_ITEM}.
+     */
+    String          VALUES                  = "Values";
+    
+    /**
+     * The item containing all the values
+     * The key is {@link #VALUES}, and the type is {@link ArrayType}.
+     */
+    Item            VALUES_ITEM             = new Item(
+                                                    VALUES,
+                                                    "",
+                                                    Item.arrayType(1, Item.arrayType(1, SimpleType.BYTE)));
+    
+    /**
+     * The CompositeType for a CollectionMetadata object. It contains the following items:
+     * <ul>
+     * <li>{@link #COLLECTION_CLASS}</li>
+     * <li>{@link #VALUES}</li>
+     * <li>{@link #VALUE_TYPE}</li>
+     * </ul>
+     */
+    CompositeType   COLLECTION_METADATA_TYPE= Item.compositeType(
+                                                    "CollectionMetadata", 
+                                                    "", 
+                                                    COLLECTION_CLASS_ITEM,
+                                                    VALUES_ITEM,
+                                                    VALUE_TYPE_ITEM);
+   
+    ///////////////////////////////////////////////////////////////
+    // Define <argument>'s CompositeType
+    // VALUE_TYPE_ITEM defined in <map>'s definition
+    ///////////////////////////////////////////////////////////////
+    
+    /**
+     * The key INDEX, used in {@link #INDEX_ITEM}.
+     */
+    String          INDEX                   = "Index";
+    
+    /**
+     * The item containing the zero-based index into the parameter list of
+     * the factory method or constructor to be invoked for this argument.
+     * The key is {@link #INDEX}, and the type is {@link SimpleType#INTEGER}.
+     */
+    Item            INDEX_ITEM              = new Item(
+                                                    INDEX, 
+                                                    "", 
+                                                    SimpleType.INTEGER);
+
+    /**
+     * The CompositeType for a Argument object. It contains the following items:
+     * <ul>
+     * <li>{@link #INDEX}</li>
+     * <li>{@link #VALUE_TYPE}</li>
+     * <li>{@link #VALUE}</li>
+     * </ul>
+     */
+    CompositeType   BEAN_ARGUMENT_TYPE           = Item.compositeType(
+                                                    "BeanArgument",
+                                                    "",
+                                                    INDEX_ITEM,
+                                                    VALUE_TYPE_ITEM,
+                                                    VALUE_ITEM);
+       
+    ///////////////////////////////////////////////////////////////
+    // Define <property>'s CompositeType
+    ///////////////////////////////////////////////////////////////
+    
+    /**
+     * The key NAME, used in {@link #NAME_ITEM}.
+     */
+    String          NAME                    = "Name";
+    
+    /**
+     * The item containing the name of the property to be injected.
+     * The key is {@link #NAME}, and the type is {@link SimpleType#STRING}.
+     */
+    Item            NAME_ITEM               = new Item(
+                                                    NAME,
+                                                    "",
+                                                    SimpleType.STRING);
+    
+    /**
+     * The CompositeType for property type. It contains the following items:
+     * <ul>
+     * <li>{@link #NAME}</li>
+     * <li>{@link #VALUE}</li>
+     * </ul>
+     */
+    CompositeType   BEAN_PROPERTY_TYPE           = Item.compositeType(
+                                                    "BeanProperty", 
+                                                    "", 
+                                                    NAME_ITEM,
+                                                    VALUE_ITEM);
+        
+    ///////////////////////////////////////////////////////////////
+    // Define Component's CompositeType
+    // <bean>, <service> & Service Reference's CompositeType will 
+    // extend this.
+    ///////////////////////////////////////////////////////////////
+    
+    /**
+     * The key ID, used in {@link #ID_ITEM}.
+     */
+    String          ID                    = "Id";
+
+    /**
+     * The item containing the component id of a component. 
+     * The key is {@link #ID}, and the type is {@link SimpleType#STRING}.
+     */
+    Item            ID_ITEM       = new Item(
+                                                    ID,
+                                                    "The id of the component",
+                                                    SimpleType.STRING);
+    /**
+     * The key ACTIVATION, used in {@link #ACTIVATION_ITEM}.
+     */
+    String          ACTIVATION              = "Activation";
+    
+    /**
+     * The item containing the activation strategy for a component. 
+     * The key is {@link #ACTIVATION}, and the type is {@link SimpleType#INTEGER}.
+     */
+    Item            ACTIVATION_ITEM         = new Item(
+                                                    ACTIVATION,
+                                                    "",
+                                                    SimpleType.INTEGER);
+    
+    /**
+     * The key DEPENDS_ON, used in {@link #DEPENDS_ON_ITEM}.
+     */
+    String          DEPENDS_ON              = "DependsOn";
+    
+    /**
+     * The item containing the ids of any components listed in a <code>depends-on</code> attribute for the component. 
+     * The key is {@link #DEPENDS_ON}, and the type is {@link JmxConstants#STRING_ARRAY_TYPE}.
+     */
+    Item            DEPENDS_ON_ITEM         = new Item(
+                                                    DEPENDS_ON,
+                                                    "",
+                                                    JmxConstants.STRING_ARRAY_TYPE);
+    
+    /**
+     * The CompositeType for a ComponentMetadata object, it contains 
+     * the following items:
+     * <ul>
+     * <li>{@link #ID}</li>
+     * <li>{@link #ACTIVATION}</li>
+     * <li>{@link #DEPENDS_ON}</li>
+     * </ul>
+     */
+    CompositeType   COMPONENT_METADATA_TYPE = Item.compositeType(
+                                                    "ComponentMetadata",
+                                                    "",
+                                                    ID_ITEM,
+                                                    ACTIVATION_ITEM,
+                                                    DEPENDS_ON_ITEM);
+                            
+    ///////////////////////////////////////////////////////////////
+    // Define <bean>'s CompositeType
+    ///////////////////////////////////////////////////////////////
+    
+    /**
+     * The key CLASS_NAME, used in {@link #CLASS_NAME_ITEM}.
+     */
+    String          CLASS_NAME              = "ClassName";
+    
+    /**
+     * The item containing the name of the class specified for the bean. 
+     * The key is {@link #CLASS_NAME}, and the type is {@link SimpleType#STRING}.
+     */
+    Item            CLASS_NAME_ITEM         = new Item(
+                                                    CLASS_NAME,
+                                                    "",
+                                                    SimpleType.STRING
+                                                    );
+    
+    /**
+     * The key INIT_METHOD, used in {@link #INIT_METHOD_ITEM}.
+     */
+    String          INIT_METHOD             = "InitMethod";
+    
+    /**
+     * The item containing the name of the init method specified for the bean.
+     * The key is {@link #INIT_METHOD}, and the type is {@link SimpleType#STRING}.
+     */
+    Item            INIT_METHOD_ITEM        = new Item(
+                                                    INIT_METHOD, 
+                                                    "", 
+                                                    SimpleType.STRING);
+    
+    /**
+     * The key DESTROY_METHOD, used in {@link #DESTROY_METHOD_ITEM}.
+     */
+    String          DESTROY_METHOD          = "DestroyMethod";
+    
+    /**
+     * The item containing the name of the destroy method specified for the bean.
+     * The key is {@link #DESTROY_METHOD}, and the type is {@link SimpleType#STRING}.
+     */
+    Item            DESTROY_METHOD_ITEM     = new Item(
+                                                    DESTROY_METHOD, 
+                                                    "", 
+                                                    SimpleType.STRING);
+
+    /**
+     * The key FACTORY_METHOD, used in {@link #FACTORY_METHOD_ITEM}.
+     */
+    String          FACTORY_METHOD          = "FactoryMethod";
+    
+    /**
+     * The item containing the name of the factory method specified for the bean.
+     * The key is {@link #FACTORY_METHOD}, and the type is {@link SimpleType#STRING}.
+     */
+    Item            FACTORY_METHOD_ITEM     = new Item(
+                                                    FACTORY_METHOD, 
+                                                    "", 
+                                                    SimpleType.STRING);
+    
+    /**
+     * The key FACTORY_COMPONENT, used in {@link #FACTORY_COMPONENT_ITEM}.
+     */
+    String          FACTORY_COMPONENT       = "FactoryComponent";
+    
+    /**
+     * The item containing the id of the factory component on which to invoke the factory method for the bean.
+     * The key is {@link #FACTORY_COMPONENT}, and the type is {@link SimpleType#STRING}.
+     */
+    Item            FACTORY_COMPONENT_ITEM  = new Item(
+                                                    FACTORY_COMPONENT, 
+                                                    "", 
+                                                    SimpleType.STRING);
+    
+    /**
+     * The key SCOPE, used in {@link #SCOPE_ITEM}.
+     */
+    String          SCOPE                   = "Scope";
+    
+    /**
+     * The item containing the scope for the bean.
+     * The key is {@link #SCOPE}, and the type is {@link SimpleType#STRING}.
+     */
+    Item            SCOPE_ITEM              = new Item(
+                                                    SCOPE, 
+                                                    "", 
+                                                    SimpleType.STRING);
+
+    /**
+     * The key ARGUMENT, used in {@link #BEAN_ARGUMENTS_ITEM}.
+     */
+    String          ARGUMENTS                   = "Arguments";
+        
+    /**
+     * The item containing the bean argument for the bean's compositeType.
+     * The key is {@link #ARGUMENTS}, and the type is {@link ARGUMENT_TYPE}.
+     */
+    Item           ARGUMENTS_ITEM     = new Item(
+                                                    ARGUMENTS, 
+                                                    "", 
+                                                    Item.arrayType(1, BEAN_ARGUMENT_TYPE));
+    
+    /**
+     * The key PROPERTY, used in {@link #PROPERTIES_ITEM}.
+     */
+    String          PROPERTIES         = "Properties";
+        
+    /**
+     * The item containing the bean property for the bean's compositeType.
+     * The key is {@link #PROPERTIES}, and the type is {@link PROPERTY_TYPE}.
+     */
+    Item            PROPERTIES_ITEM    = new Item(
+                                                    PROPERTIES, 
+                                                    "", 
+                                                    Item.arrayType(1, BEAN_PROPERTY_TYPE));
+    
+    /**
+     * The CompositeType for a BeanMetadata object, it extends {@link #COMPONENT_METADATA_TYPE} 
+     * and adds the following items:
+     * <ul>
+     * <li>{@link #CLASS_NAME}</li>
+     * <li>{@link #INIT_METHOD}</li>
+     * <li>{@link #DESTROY_METHOD}</li>
+     * <li>{@link #FACTORY_METHOD}</li>
+     * <li>{@link #FACTORY_COMPONENT}</li>
+     * <li>{@link #SCOPE}</li>
+     * <li>{@link #ARGUMENTS}</li>
+     * <li>{@link #PROPERTIES}</li>
+     * </ul>
+     */
+    CompositeType   BEAN_METADATA_TYPE      = Item.extend(
+                                                    COMPONENT_METADATA_TYPE, 
+                                                    "BeanMetadata", 
+                                                    "",
+                                                    CLASS_NAME_ITEM,
+                                                    INIT_METHOD_ITEM,
+                                                    DESTROY_METHOD_ITEM, 
+                                                    FACTORY_METHOD_ITEM,
+                                                    FACTORY_COMPONENT_ITEM,
+                                                    SCOPE_ITEM,
+                                                    ARGUMENTS_ITEM,
+                                                    PROPERTIES_ITEM);
+    
+    ///////////////////////////////////////////////////////////////
+    // Define <service>'s CompositeType
+    ///////////////////////////////////////////////////////////////
+    
+    /**
+     * The key INTERFACES, used in {@link #INTERFACES_ITEM}.
+     */
+    String          INTERFACES              = "Interfaces";
+    
+    /**
+     * The item containing the type names of the interfaces that the service should be advertised as supporting.
+     * The key is {@link #INTERFACES}, and the type is {@link JmxConstants#STRING_ARRAY_TYPE}.
+     */
+    Item            INTERFACES_ITEM         = new Item(
+                                                    INTERFACES, 
+                                                    "", 
+                                                    JmxConstants.STRING_ARRAY_TYPE);
+    /**
+     * The key AUTO_EXPORT, used in {@link #AUTO_EXPORT_ITEM}.
+     */
+    String          AUTO_EXPORT             = "AutoExport";
+    
+    /**
+     * The item containing the auto-export mode for the service.
+     * The key is {@link #AUTO_EXPORT}, and the type is {@link SimpleType#INTEGER}.
+     */
+    Item            AUTO_EXPORT_ITEM        = new Item(
+                                                    AUTO_EXPORT, 
+                                                    "", 
+                                                    SimpleType.INTEGER);
+
+    /**
+     * The key RANKING, used in {@link #RANKING_ITEM}.
+     */
+    String          RANKING                 = "Ranking";
+    
+    /**
+     * The item containing the ranking value to use when advertising the service.
+     * The key is {@link #RANKING}, and the type is {@link SimpleType#INTEGER}.
+     */
+    Item            RANKING_ITEM            = new Item(
+                                                    RANKING, 
+                                                    "", 
+                                                    SimpleType.INTEGER);
+
+    /**
+     * The key SERVICE_COMPONENT, used in {@link #SERVICE_COMPONENT_ITEM}.
+     */
+    String          SERVICE_COMPONENT       = "ServiceComponent";
+    
+    /**
+     * The item containing the id of the component to be exported as a service.
+     * The key is {@link #SERVICE_COMPONENT}, and the type is {@link SimpleType#STRING}.
+     */
+    Item            SERVICE_COMPONENT_ITEM  = new Item(
+                                                    SERVICE_COMPONENT, 
+                                                    "", 
+                                                    SimpleType.STRING);
+    
+    /**
+     * The key SERVICE_PROPERTIES, used in {@link #SERVICE_PROPERTIES_ITEM}.
+     */
+    String          SERVICE_PROPERTIES      = "ServiceProperties";
+    
+    /**
+     * The item containing the id of the component to be exported as a service.
+     * The key is {@link #SERVICE_COMPONENT}, and the type is {@link SimpleType#STRING}.
+     */
+    Item            SERVICE_PROPERTIES_ITEM = new Item(
+                                                    SERVICE_PROPERTIES,
+                                                    "",
+                                                    Item.arrayType(1, MAP_ENTRY_TYPE));
+    
+    /**
+     * The CompositeType for a ServiceMetadata object, it extends {@link #COMPONENT_METADATA_TYPE}
+     * and adds the following items:
+     * <ul>
+     * <li>{@link #INTERFACES}</li>
+     * <li>{@link #AUTO_EXPORT}</li>
+     * <li>{@link #RANKING}</li>
+     * <li>{@link #SERVICE_COMPONENT}</li>
+     * <li>{@link #SERVICE_PROPERTIES}</li>
+     * </ul>
+     */
+    CompositeType   SERVICE_MATADATA_TYPE        = Item.extend(
+                                                    COMPONENT_METADATA_TYPE, 
+                                                    "ServiceMetadata", 
+                                                    "", 
+                                                    INTERFACES_ITEM,
+                                                    AUTO_EXPORT_ITEM,
+                                                    RANKING_ITEM,
+                                                    SERVICE_COMPONENT_ITEM,
+                                                    SERVICE_PROPERTIES_ITEM);
+
+    ///////////////////////////////////////////////////////////////
+    // Define Service Reference's CompositeType, 
+    // <reference> & <reference-list> will extend this
+    ///////////////////////////////////////////////////////////////
+    
+    /**
+     * The key AVAILABILITY, used in {@link #AVAILABILITY_ITEM}.
+     */
+    String          AVAILABILITY            = "Availability";
+    
+    /**
+     * The item containing whether or not a matching service is required at all times.
+     * The key is {@link #AVAILABILITY}, and the type is {@link SimpleType#INTEGER}.
+     */
+    Item            AVAILABILITY_ITEM       = new Item(
+                                                    AVAILABILITY, 
+                                                    "", 
+                                                    SimpleType.INTEGER);
+    
+    /**
+     * The key INTERFACE, used in {@link #INTERFACE_ITEM}.
+     */
+    String          INTERFACE               = "Interface";
+    
+    /**
+     * The item containing the name of the interface type that a matching service must support.
+     * The key is {@link #INTERFACE}, and the type is {@link SimpleType#STRING}.
+     */
+    Item            INTERFACE_ITEM          = new Item(
+                                                    INTERFACE, 
+                                                    "", 
+                                                    SimpleType.STRING);
+    
+    /**
+     * The key COMPONENT_NAME, used in {@link #COMPONENT_NAME_ITEM}.
+     */
+    String          COMPONENT_NAME          = "ComponentName";
+    
+    /**
+     * The item containing the value of the <code>component-name</code> attribute of the service reference.
+     * The key is {@link #INTERFACE}, and the type is {@link SimpleType#STRING}.
+     */
+    Item            COMPONENT_NAME_ITEM     = new Item(
+                                                    COMPONENT_NAME, 
+                                                    "", 
+                                                    SimpleType.STRING);
+    /**
+     * The key FILTER, used in {@link #FILTER_ITEM}.
+     */
+    String          FILTER                  = "Filter";
+    
+    /**
+     * The item containing the filter expression that a matching service must match.
+     * The key is {@link #FILTER}, and the type is {@link SimpleType#STRING}.
+     */
+    Item            FILTER_ITEM             = new Item(
+                                                    FILTER, 
+                                                    "", 
+                                                    SimpleType.STRING);
+    
+    /**
+     * The CompositeType for a ServiceReferenceMetadata object, it extends 
+     * {@link #COMPONENT_METADATA_TYPE} and adds the following items:
+     * <ul>
+     * <li>{@link #AVAILABILITY}</li>
+     * <li>{@link #INTERFACE}</li>
+     * <li>{@link #COMPONENT_NAME}</li>
+     * <li>{@link #FILTER}</li>
+     * </ul>
+     */
+    CompositeType   SERVICE_REFERENCE_METADATA_TYPE  = Item.extend(
+                                                    COMPONENT_METADATA_TYPE, 
+                                                    "ServiceReferenceMetadata", 
+                                                    "", 
+                                                    AVAILABILITY_ITEM,
+                                                    INTERFACE_ITEM,
+                                                    COMPONENT_NAME_ITEM,
+                                                    FILTER_ITEM);
+    
+    ///////////////////////////////////////////////////////////////
+    // Define <reference>'s CompositeType
+    ///////////////////////////////////////////////////////////////
+    
+    /**
+     * The key TIME_OUT, used in {@link #TIMEOUT_ITEM}.
+     */
+    String          TIMEOUT                = "TimeOut";
+    
+    /**
+     * The item containing the timeout for service invocations when a backing service is is unavailable.
+     * The key is {@link #TIMEOUT}, and the type is {@link SimpleType#LONG}.
+     */
+    Item            TIMEOUT_ITEM           = new Item(
+                                                    TIMEOUT, 
+                                                    "", 
+                                                    SimpleType.LONG);
+    /**
+     * The CompositeType for a ReferenceMetadata object, it extends 
+     * {@link #SERVICE_REFERENCE_METADATA_TYPE} and adds the following items:
+     * <ul>
+     * <li>{@link #TIMEOUT}</li>
+     * </ul>
+     */
+    CompositeType   REFERENCE_METADATA_TYPE = Item.extend(
+                                                    SERVICE_REFERENCE_METADATA_TYPE, 
+                                                    "ReferenceMetadata", 
+                                                    "", 
+                                                    TIMEOUT_ITEM);
+    
+    ///////////////////////////////////////////////////////////////
+    // Define <reference-list>'s CompositeType
+    ///////////////////////////////////////////////////////////////
+    
+    /**
+     * The key MEMBER_TYPE, used in {@link #MEMBER_TYPE_ITEM}.
+     */
+    String          MEMBER_TYPE             = "MemberType";
+    
+    /**
+     * The item containing whether the List will contain service object proxies or ServiceReference objects.
+     * The key is {@link #MEMBER_TYPE}, and the type is {@link SimpleType#INTEGER}.
+     */
+    Item            MEMBER_TYPE_ITEM        = new Item(
+                                                    MEMBER_TYPE, 
+                                                    "", 
+                                                    SimpleType.INTEGER);
+    
+    /**
+     * The CompositeType for a ReferenceListMetadata object, it extends 
+     * {@link #SERVICE_REFERENCE_METADATA_TYPE} and adds the following items:
+     * <ul>
+     * <li>{@link #MEMBER_TYPE}</li>
+     * </ul>
+     */
+    CompositeType   REFERENCE_LIST_METADATA_TYPE = Item.extend(
+                                                    SERVICE_REFERENCE_METADATA_TYPE, 
+                                                    "ReferenceListMetadata", 
+                                                    "", 
+                                                    MEMBER_TYPE_ITEM);
+
+
+    /**
+     * Returns the list of component id.
+     * 
+     * @param containerServiceId The blueprint container service id
+     * @return the array of component id
+     */
+    String[] getComponentIds(long containerServiceId);
+    
+    /**
+     * Returns all component ids of the specified component type
+     * 
+     * @param containerServiceId The blueprint container service id
+     * @param type The string used to specify the type of component
+     * @return the array of component id
+     */
+    String[] getComponentIdsByType(long containerServiceId, String type);
+    
+    /**
+     * Returns the BeanMetadata according to the its component id.
+     * The returned Composite Data is typed by {@link #BEAN_METADATA_TYPE}.
+     * 
+     * @param containerServiceId The blueprint container service id
+     * @param componentId The component id
+     * @return the BeanMetadata, see {@link #BEAN_METADATA_TYPE}
+     */
+    CompositeData getBeanMetadata(long containerServiceId, String componentId);
+    
+    /**
+     * Returns the ServiceMetadata according to the its component id.
+     * The returned Composite Data is typed by {@link #SERVICE_MATADATA_TYPE}.
+     * 
+     * @param containerServiceId The blueprint container service id
+     * @param componentId The component id
+     * @return the ServiceMetadata, see {@link #SERVICE_MATADATA_TYPE} 
+     */
+    CompositeData getServiceMetadata(long containerServiceId, String componentId);
+    
+    /**
+     * Returns the ReferenceMetadata according to the its component id.
+     * The returned Composite Data is typed by {@link #REFERENCE_METADATA_TYPE}.
+     * 
+     * @param containerServiceId The blueprint container service id
+     * @param componentId The component id
+     * @return the ReferenceMetadata, see {@link #REFERENCE_METADATA_TYPE}
+     */
+    CompositeData getReferenceMetadata(long containerServiceId, String componentId);
+    
+    /**
+     * Returns the ReferenceListMetadata according to the its component id.
+     * The returned Composite Data is typed by {@link #REFERENCE_LIST_METADATA_TYPE}.
+     * 
+     * @param containerServiceId The blueprint container service id
+     * @param componentId The component id
+     * @return the ReferenceListMetadata, see {@link #REFERENCE_LIST_METADATA_TYPE} 
+     */
+    CompositeData getReferenceListMetadata(long containerServiceId, String componentId);
+    
+    /**
+     * Returns all the blueprint containers' service IDs, which successfully
+     * created from blueprint bundles.
+     * 
+     * @return the list of all the service IDs of the blueprint containers created by current extender 
+     * @throws IOException if the operation fails
+     */
+    long[] getBlueprintContainerServiceIds() throws IOException;
+    
+    /**
+     * Returns the blueprint container's service id if the bundle specified 
+     * by the bundle id is a blueprint bundle.
+     * 
+     * @param bundleId The bundle id of a blueprint bundle
+     * @return the blueprint container's service id, or null if the blueprint bundle initialed failed.
+     * @throws IOException if the operation fails
+     * @throws IllegalArgumentException if the bundle is not a blueprint bundle
+     */
+    long getBlueprintContainerServiceId(long bundleId) throws IOException;
+}

Propchange: geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx/src/main/java/org/apache/geronimo/blueprint/jmx/BlueprintMetadataMBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx/src/main/java/org/apache/geronimo/blueprint/jmx/BlueprintStateMBean.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx/src/main/java/org/apache/geronimo/blueprint/jmx/BlueprintStateMBean.java?rev=880663&r1=880662&r2=880663&view=diff
==============================================================================
--- geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx/src/main/java/org/apache/geronimo/blueprint/jmx/BlueprintStateMBean.java (original)
+++ geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx/src/main/java/org/apache/geronimo/blueprint/jmx/BlueprintStateMBean.java Mon Nov 16 08:32:05 2009
@@ -1,5 +1,7 @@
 package org.apache.geronimo.blueprint.jmx;
 
+import java.io.IOException;
+
 import javax.management.openmbean.CompositeData;
 import javax.management.openmbean.CompositeType;
 import javax.management.openmbean.SimpleType;
@@ -14,585 +16,41 @@
  */
 public interface BlueprintStateMBean {
     /**
-     * The object name for this mbean.
+     * The object name for this MBean.
      */
-    String OBJECTNAME = JmxConstants.OSGI_COMPENDIUM+":service=blueprint,version=1.0";
-    
-    ///////////////////////////////////////////////////////////////
-    // Define Component's CompositeType
-    // <bean>, <service> & Service Reference's CompositeType will 
-    // extend this.
-    ///////////////////////////////////////////////////////////////
-    
-    /**
-     * The key COMPONENT_ID, used in {@link #COMPONENT_ID_ITEM}.
-     */
-    String          COMPONENT_ID                    = "ComponentId";
-
-    /**
-     * The item containing the component id of a component. 
-     * The key is {@link #COMPONENT_ID}, and the type is {@link SimpleType#STRING}.
-     */
-    Item            COMPONENT_ID_ITEM       = new Item(
-                                                    COMPONENT_ID,
-                                                    "The id of the component",
-                                                    SimpleType.STRING);
-    /**
-     * The key ACTIVATION, used in {@link #ACTIVATION_ITEM}.
-     */
-    String          ACTIVATION              = "Activation";
-    
-    /**
-     * The item containing the activation strategy for a component. 
-     * The key is {@link #ACTIVATION}, and the type is {@link SimpleType#INTEGER}.
-     */
-    Item            ACTIVATION_ITEM         = new Item(
-                                                    ACTIVATION,
-                                                    "",
-                                                    SimpleType.INTEGER);
-    
-    /**
-     * The key DEPENDS_ON, used in {@link #DEPENDS_ON_ITEM}.
-     */
-    String          DEPENDS_ON              = "DependsOn";
-    
-    /**
-     * The item containing the ids of any components listed in a <code>depends-on</code> attribute for the component. 
-     * The key is {@link #DEPENDS_ON}, and the type is {@link JmxConstants#STRING_ARRAY_TYPE}.
-     */
-    Item            DEPENDS_ON_ITEM         = new Item(
-                                                    DEPENDS_ON,
-                                                    "",
-                                                    JmxConstants.STRING_ARRAY_TYPE);
-    
-    /**
-     * The CompositeType for a ComponentMetadata object, it contains 
-     * the following items:
-     * <ul>
-     * <li>{@link #COMPONENT_ID}</li>
-     * <li>{@link #ACTIVATION}</li>
-     * <li>{@link #DEPENDS_ON}</li>
-     * </ul>
-     */
-    CompositeType   COMPONENT_METADATA_TYPE = Item.compositeType(
-                                                    "ComponentMetadata",
-                                                    "",
-                                                    COMPONENT_ID_ITEM,
-                                                    ACTIVATION_ITEM,
-                                                    DEPENDS_ON_ITEM);
-                            
-    ///////////////////////////////////////////////////////////////
-    // Define <bean>'s CompositeType
-    ///////////////////////////////////////////////////////////////
-    
-    /**
-     * The key CLASS_NAME, used in {@link #CLASS_NAME_ITEM}.
-     */
-    String          CLASS_NAME              = "ClassName";
-    
-    /**
-     * The item containing the name of the class specified for the bean. 
-     * The key is {@link #CLASS_NAME}, and the type is {@link SimpleType#STRING}.
-     */
-    Item            CLASS_NAME_ITEM         = new Item(
-                                                    CLASS_NAME,
-                                                    "",
-                                                    SimpleType.STRING
-                                                    );
-    
-    /**
-     * The key INIT_METHOD, used in {@link #INIT_METHOD_ITEM}.
-     */
-    String          INIT_METHOD             = "InitMethod";
-    
-    /**
-     * The item containing the name of the init method specified for the bean.
-     * The key is {@link #INIT_METHOD}, and the type is {@link SimpleType#STRING}.
-     */
-    Item            INIT_METHOD_ITEM        = new Item(
-                                                    INIT_METHOD, 
-                                                    "", 
-                                                    SimpleType.STRING);
-    
-    /**
-     * The key DESTROY_METHOD, used in {@link #DESTROY_METHOD_ITEM}.
-     */
-    String          DESTROY_METHOD          = "DestroyMethod";
-    
-    /**
-     * The item containing the name of the destroy method specified for the bean.
-     * The key is {@link #DESTROY_METHOD}, and the type is {@link SimpleType#STRING}.
-     */
-    Item            DESTROY_METHOD_ITEM     = new Item(
-                                                    DESTROY_METHOD, 
-                                                    "", 
-                                                    SimpleType.STRING);
-
-    /**
-     * The key FACTORY_METHOD, used in {@link #FACTORY_METHOD_ITEM}.
-     */
-    String          FACTORY_METHOD          = "FactoryMethod";
-    
-    /**
-     * The item containing the name of the factory method specified for the bean.
-     * The key is {@link #FACTORY_METHOD}, and the type is {@link SimpleType#STRING}.
-     */
-    Item            FACTORY_METHOD_ITEM     = new Item(
-                                                    FACTORY_METHOD, 
-                                                    "", 
-                                                    SimpleType.STRING);
-    
-    /**
-     * The key FACTORY_COMPONENT, used in {@link #FACTORY_COMPONENT_ITEM}.
-     */
-    String          FACTORY_COMPONENT       = "FactoryComponent";
-    
-    /**
-     * The item containing the id of the factory component on which to invoke the factory method for the bean.
-     * The key is {@link #FACTORY_COMPONENT}, and the type is {@link SimpleType#STRING}.
-     */
-    Item            FACTORY_COMPONENT_ITEM  = new Item(
-                                                    FACTORY_COMPONENT, 
-                                                    "", 
-                                                    SimpleType.STRING);
-    
-    /**
-     * The key SCOPE, used in {@link #SCOPE_ITEM}.
-     */
-    String          SCOPE                   = "Scope";
-    
-    /**
-     * The item containing the scope for the bean.
-     * The key is {@link #SCOPE}, and the type is {@link SimpleType#STRING}.
-     */
-    Item            SCOPE_ITEM              = new Item(
-                                                    SCOPE, 
-                                                    "", 
-                                                    SimpleType.STRING);
-
-    /**
-     * The CompositeType for a BeanMetadata object, it extends {@link #COMPONENT_METADATA_TYPE} 
-     * and adds the following items:
-     * <ul>
-     * <li>{@link #CLASS_NAME}</li>
-     * <li>{@link #INIT_METHOD}</li>
-     * <li>{@link #DESTROY_METHOD}</li>
-     * <li>{@link #FACTORY_METHOD}</li>
-     * <li>{@link #FACTORY_COMPONENT}</li>
-     * <li>{@link #SCOPE}</li>
-     * </ul>
-     */
-    CompositeType   BEAN_METADATA_TYPE      = Item.extend(
-                                                    COMPONENT_METADATA_TYPE, 
-                                                    "BeanMetadata", 
-                                                    "",
-                                                    CLASS_NAME_ITEM,
-                                                    INIT_METHOD_ITEM,
-                                                    DESTROY_METHOD_ITEM, 
-                                                    FACTORY_METHOD_ITEM,
-                                                    FACTORY_COMPONENT_ITEM,
-                                                    SCOPE_ITEM);
-    
-    ///////////////////////////////////////////////////////////////
-    // Define <service>'s CompositeType
-    ///////////////////////////////////////////////////////////////
-    
-    /**
-     * The key INTERFACES, used in {@link #INTERFACES_ITEM}.
-     */
-    String          INTERFACES              = "Interfaces";
-    
-    /**
-     * The item containing the type names of the interfaces that the service should be advertised as supporting.
-     * The key is {@link #INTERFACES}, and the type is {@link JmxConstants#STRING_ARRAY_TYPE}.
-     */
-    Item            INTERFACES_ITEM         = new Item(
-                                                    INTERFACES, 
-                                                    "", 
-                                                    JmxConstants.STRING_ARRAY_TYPE);
-    /**
-     * The key AUTO_EXPORT, used in {@link #AUTO_EXPORT_ITEM}.
-     */
-    String          AUTO_EXPORT             = "AutoExport";
-    
-    /**
-     * The item containing the auto-export mode for the service.
-     * The key is {@link #AUTO_EXPORT}, and the type is {@link SimpleType#INTEGER}.
-     */
-    Item            AUTO_EXPORT_ITEM        = new Item(
-                                                    AUTO_EXPORT, 
-                                                    "", 
-                                                    SimpleType.INTEGER);
-
-    /**
-     * The key RANKING, used in {@link #RANKING_ITEM}.
-     */
-    String          RANKING                 = "Ranking";
-    
-    /**
-     * The item containing the ranking value to use when advertising the service.
-     * The key is {@link #RANKING}, and the type is {@link SimpleType#INTEGER}.
-     */
-    Item            RANKING_ITEM            = new Item(
-                                                    RANKING, 
-                                                    "", 
-                                                    SimpleType.INTEGER);
-
-    /**
-     * The key SERVICE_COMPONENT, used in {@link #SERVICE_COMPONENT_ITEM}.
-     */
-    String          SERVICE_COMPONENT       = "ServiceComponent";
-    
-    /**
-     * The item containing the id of the component to be exported as a service.
-     * The key is {@link #SERVICE_COMPONENT}, and the type is {@link SimpleType#STRING}.
-     */
-    Item            SERVICE_COMPONENT_ITEM  = new Item(
-                                                    SERVICE_COMPONENT, 
-                                                    "", 
-                                                    SimpleType.STRING);
-    
-    /**
-     * The CompositeType for a ServiceMetadata object, it extends {@link #COMPONENT_METADATA_TYPE}
-     * and adds the following items:
-     * <ul>
-     * <li>{@link #INTERFACES}</li>
-     * <li>{@link #AUTO_EXPORT}</li>
-     * <li>{@link #RANKING}</li>
-     * <li>{@link #SERVICE_COMPONENT}</li>
-     * </ul>
-     */
-    CompositeType   SERVICE_MATADATA_TYPE        = Item.extend(
-                                                    COMPONENT_METADATA_TYPE, 
-                                                    "ServiceMetadata", 
-                                                    "", 
-                                                    INTERFACES_ITEM,
-                                                    AUTO_EXPORT_ITEM,
-                                                    RANKING_ITEM,
-                                                    SERVICE_COMPONENT_ITEM);
-
-    ///////////////////////////////////////////////////////////////
-    // Define Service Reference's CompositeType, 
-    // <reference> & <reference-list> will extend this
-    ///////////////////////////////////////////////////////////////
-    
-    /**
-     * The key AVAILABILITY, used in {@link #AVAILABILITY_ITEM}.
-     */
-    String          AVAILABILITY            = "Availability";
-    
-    /**
-     * The item containing whether or not a matching service is required at all times.
-     * The key is {@link #AVAILABILITY}, and the type is {@link SimpleType#INTEGER}.
-     */
-    Item            AVAILABILITY_ITEM       = new Item(
-                                                    AVAILABILITY, 
-                                                    "", 
-                                                    SimpleType.INTEGER);
-    
-    /**
-     * The key INTERFACE, used in {@link #INTERFACE_ITEM}.
-     */
-    String          INTERFACE               = "Interface";
-    
-    /**
-     * The item containing the name of the interface type that a matching service must support.
-     * The key is {@link #INTERFACE}, and the type is {@link SimpleType#STRING}.
-     */
-    Item            INTERFACE_ITEM          = new Item(
-                                                    INTERFACE, 
-                                                    "", 
-                                                    SimpleType.STRING);
-    
-    /**
-     * The key COMPONENT_NAME, used in {@link #COMPONENT_NAME_ITEM}.
-     */
-    String          COMPONENT_NAME          = "ComponentName";
-    
-    /**
-     * The item containing the value of the <code>component-name</code> attribute of the service reference.
-     * The key is {@link #INTERFACE}, and the type is {@link SimpleType#STRING}.
-     */
-    Item            COMPONENT_NAME_ITEM     = new Item(
-                                                    COMPONENT_NAME, 
-                                                    "", 
-                                                    SimpleType.STRING);
-    /**
-     * The key FILTER, used in {@link #FILTER_ITEM}.
-     */
-    String          FILTER                  = "Filter";
-    
-    /**
-     * The item containing the filter expression that a matching service must match.
-     * The key is {@link #FILTER}, and the type is {@link SimpleType#STRING}.
-     */
-    Item            FILTER_ITEM             = new Item(
-                                                    FILTER, 
-                                                    "", 
-                                                    SimpleType.STRING);
-    
-    /**
-     * The CompositeType for a ServiceReferenceMetadata object, it extends 
-     * {@link #COMPONENT_METADATA_TYPE} and adds the following items:
-     * <ul>
-     * <li>{@link #AVAILABILITY}</li>
-     * <li>{@link #INTERFACE}</li>
-     * <li>{@link #COMPONENT_NAME}</li>
-     * <li>{@link #FILTER}</li>
-     * </ul>
-     */
-    CompositeType   SERVICE_REFERENCE_METADATA_TYPE  = Item.extend(
-                                                    COMPONENT_METADATA_TYPE, 
-                                                    "ServiceReferenceMetadata", 
-                                                    "", 
-                                                    AVAILABILITY_ITEM,
-                                                    INTERFACE_ITEM,
-                                                    COMPONENT_NAME_ITEM,
-                                                    FILTER_ITEM);
-    
-    ///////////////////////////////////////////////////////////////
-    // Define <reference>'s CompositeType
-    ///////////////////////////////////////////////////////////////
-    
-    /**
-     * The key TIME_OUT, used in {@link #TIMEOUT_ITEM}.
-     */
-    String          TIMEOUT                = "TimeOut";
-    
-    /**
-     * The item containing the timeout for service invocations when a backing service is is unavailable.
-     * The key is {@link #TIMEOUT}, and the type is {@link SimpleType#LONG}.
-     */
-    Item            TIMEOUT_ITEM           = new Item(
-                                                    TIMEOUT, 
-                                                    "", 
-                                                    SimpleType.LONG);
-    /**
-     * The CompositeType for a ReferenceMetadata object, it extends 
-     * {@link #SERVICE_REFERENCE_METADATA_TYPE} and adds the following items:
-     * <ul>
-     * <li>{@link #TIMEOUT}</li>
-     * </ul>
-     */
-    CompositeType   REFERENCE_METADATA_TYPE = Item.extend(
-                                                    SERVICE_REFERENCE_METADATA_TYPE, 
-                                                    "ReferenceMetadata", 
-                                                    "", 
-                                                    TIMEOUT_ITEM);
-    
-    ///////////////////////////////////////////////////////////////
-    // Define <reference-list>'s CompositeType
-    ///////////////////////////////////////////////////////////////
-    
-    /**
-     * The key MEMBER_TYPE, used in {@link #MEMBER_TYPE_ITEM}.
-     */
-    String          MEMBER_TYPE             = "MemberType";
-    
-    /**
-     * The item containing whether the List will contain service object proxies or ServiceReference objects.
-     * The key is {@link #MEMBER_TYPE}, and the type is {@link SimpleType#INTEGER}.
-     */
-    Item            MEMBER_TYPE_ITEM        = new Item(
-                                                    MEMBER_TYPE, 
-                                                    "", 
-                                                    SimpleType.INTEGER);
-    
-    /**
-     * The CompositeType for a ReferenceListMetadata object, it extends 
-     * {@link #SERVICE_REFERENCE_METADATA_TYPE} and adds the following items:
-     * <ul>
-     * <li>{@link #MEMBER_TYPE}</li>
-     * </ul>
-     */
-    CompositeType   REFERENCE_LIST_METADATA_TYPE = Item.extend(
-                                                    SERVICE_REFERENCE_METADATA_TYPE, 
-                                                    "ReferenceListMetadata", 
-                                                    "", 
-                                                    MEMBER_TYPE_ITEM);
-                                                    
-    ///////////////////////////////////////////////////////////////
-    // Define <value>'s CompositeType, has not been used yet
-    // also should add more CompositeType for <ref>, <idref>...
-    ///////////////////////////////////////////////////////////////
-    
-//    /**
-//     * The key STRING_VALUE, used in {@link #STRING_VALUE_ITEM}.
-//     */
-//    String          STRING_VALUE            = "StringValue";
-//    
-//    /**
-//     * The item containing the un-converted string representation of the value.
-//     * The key is {@link #STRING_VALUE}, and the type is {@link SimpleType#STRING}.
-//     */
-//    Item            STRING_VALUE_ITEM       = new Item(
-//                                                    STRING_VALUE, 
-//                                                    "", 
-//                                                    SimpleType.STRING);
-//    
-//    /**
-//     * The key TYPE, used in {@link #TYPE_ITEM}.
-//     */
-//    String          TYPE                    = "Type";
-//    
-//    /**
-//     * The item containing the name of the type to which the value should be converted.
-//     * The key is {@link #TYPE}, and the type is {@link SimpleType#STRING}.
-//     */
-//    Item            TYPE_ITEM               = new Item(
-//                                                    TYPE, 
-//                                                    "", 
-//                                                    SimpleType.STRING);
-//    
-//    /**
-//     * The CompositeType for a ValueMetadata object. It contains the following items:
-//     * <ul>
-//     * <li>{@link #STRING_VALUE}</li>
-//     * <li>{@link #TYPE}</li>
-//     * </ul>
-//     */
-//    CompositeType   VALUE_METADATA_TYPE     = Item.compositeType(
-//                                                    "ValueMetadata", 
-//                                                    "", 
-//                                                    STRING_VALUE_ITEM, 
-//                                                    TYPE_ITEM);                  
-    
-    ///////////////////////////////////////////////////////////////
-    // Define Generic CompositeType
-    // which represents the compositeData of this type is actually 
-    // the data of <value>, <ref>, <idref>, <map>, Collectoins, <props> CompositeType
-    ///////////////////////////////////////////////////////////////
-    
-    /**
-     * The CompositeType for a generic metadata
-     */
-    CompositeType   GENERIC_METADATA_TYPE           = Item.compositeType("GenericMetaData", "", new Item[0]);
-    
-    /**
-     * The key GENERIC_VALUE, used in {@link #GENERIC_VALUE_ITEM}.
-     */
-    String          GENERIC_VALUE                   = "GenericValue";
-        
-    /**
-     * The item containing the Metadata for the argument value.
-     * The key is {@link #VALUE}, and the type is {@link METADATA_TYPE}.
-     */
-    Item            GENERIC_VALUE_ITEM       = new Item(
-                                                    GENERIC_VALUE, 
-                                                    "", 
-                                                    GENERIC_METADATA_TYPE);
-    
-    ///////////////////////////////////////////////////////////////
-    // Define <argument>'s CompositeType
-    ///////////////////////////////////////////////////////////////
-    
-    /**
-     * The key INDEX, used in {@link #INDEX_ITEM}.
-     */
-    String          INDEX                   = "Index";
-    
-    /**
-     * The item containing the zero-based index into the parameter list of
-     * the factory method or constructor to be invoked for this argument.
-     * The key is {@link #INDEX}, and the type is {@link SimpleType#INTEGER}.
-     */
-    Item            INDEX_ITEM              = new Item(
-                                                    INDEX, 
-                                                    "", 
-                                                    SimpleType.INTEGER);
-
-    /**
-     * The key VALUE_TYPE, used in {@link #VALUE_TYPE_ITEM}.
-     */
-    String          VALUE_TYPE              = "ValueType";
-    
-    /**
-     * The item containing the name of the value type to match the argument and
-     * convert the value into when invoking the constructor or factory method.
-     * The key is {@link #VALUE_TYPE}, and the type is {@link SimpleType#STRING}.
-     */
-    Item            VALUE_TYPE_ITEM         = new Item(
-                                                    VALUE_TYPE, 
-                                                    "", 
-                                                    SimpleType.STRING);
-    
-    /**
-     * The CompositeType for a Argument object. It contains the following items:
-     * <ul>
-     * <li>{@link #INDEX}</li>
-     * <li>{@link #VALUE_TYPE}</li>
-     * <li>{@link #VALUE}</li>
-     * </ul>
-     */
-    CompositeType   ARGUMENT_TYPE           = Item.compositeType(
-                                                    "Argument",
-                                                    "",
-                                                    INDEX_ITEM,
-                                                    VALUE_TYPE_ITEM,
-                                                    GENERIC_VALUE_ITEM);
-    
-    ///////////////////////////////////////////////////////////////
-    // Define <property>'s CompositeType
-    ///////////////////////////////////////////////////////////////
-    
-    /**
-     * The key NAME, used in {@link #NAME_ITEM}.
-     */
-    String          NAME                    = "Name";
-    
-    /**
-     * The item containing the name of the property to be injected.
-     * The key is {@link #NAME}, and the type is {@link SimpleType#STRING}.
-     */
-    Item            NAME_ITEM               = new Item(
-                                                    NAME,
-                                                    "",
-                                                    SimpleType.STRING);
-    
-    /**
-     * The CompositeType for property type. It contains the following items:
-     * <ul>
-     * <li>{@link #NAME}</li>
-     * <li>{@link #VALUE}</li>
-     * </ul>
-     */
-    CompositeType   PROPERTY_TYPE           = Item.compositeType(
-                                                    "Property", 
-                                                    "", 
-                                                    NAME_ITEM,
-                                                    GENERIC_VALUE_ITEM);
+    String OBJECTNAME = JmxConstants.OSGI_COMPENDIUM+":service=blueprintState,version=1.0";
     
     ///////////////////////////////////////////////////////////////
     // Define Event's CompositeType
     ///////////////////////////////////////////////////////////////
     
     /**
-     * The key EVENT_BUNDLE, used in {@link #EVENT_BUNDLE_ID_ITEM}.
+     * The key BUNDLE, used in {@link #BUNDLE_ITEM}.
      */
-    String          EVENT_BUNDLE            = "EventBundle";
+    String          BUNDLE                  = "Bundle";
     
     /**
      * The item containing the Blueprint bundle id associated with this event.
-     * The key is {@link #EVENT_BUNDLE}, and the type is {@link SimpleType#LONG}.
+     * The key is {@link #BUNDLE}, and the type is {@link SimpleType#LONG}.
      */
-    Item            EVENT_BUNDLE_ID_ITEM    = new Item(
-                                                    EVENT_BUNDLE,
+    Item            BUNDLE_ITEM             = new Item(
+                                                    BUNDLE,
                                                     "",
                                                     SimpleType.LONG);
     
     /**
-     * The key EVENT_EXTENDER_BUNDLE, used in {@link #EVENT_EXTENDER_BUNDLE_ID_ITEM}.
+     * The key EXTENDER_BUNDLE, used in {@link #EXTENDER_BUNDLE_ITEM}.
      */
-    String          EVENT_EXTENDER_BUNDLE   = "EventExtenderBundle";
+    String          EXTENDER_BUNDLE   = "ExtenderBundle";
     
     /**
      * The item containing the Blueprint extender bundle id that is generating this event.
-     * The key is {@link #EVENT_EXTENDER_BUNDLE}, and the type is {@link SimpleType#LONG}.
+     * The key is {@link #EXTENDER_BUNDLE}, and the type is {@link SimpleType#LONG}.
      */
-    Item            EVENT_EXTENDER_BUNDLE_ID_ITEM    = new Item(
-                                                            EVENT_EXTENDER_BUNDLE,
-                                                            "",
-                                                            SimpleType.LONG);
+    Item            EXTENDER_BUNDLE_ITEM    = new Item(
+                                                    EXTENDER_BUNDLE,
+                                                    "",
+                                                    SimpleType.LONG);
 
     /**
      * The key IS_REPLAY, used in {@link #IS_REPLAY_ITEM}.
@@ -604,57 +62,57 @@
      * The key is {@link #IS_REPLAY}, and the type is {@link SimpleType#BOOLEAN}.
      */
     Item            IS_REPLAY_ITEM          = new Item(
-                                                IS_REPLAY,
-                                                "",
-                                                SimpleType.BOOLEAN);
+                                                    IS_REPLAY,
+                                                    "",
+                                                    SimpleType.BOOLEAN);
     
     
     /**
-     * The key EVENT_TYPE, used in {@link #EVENT_TYPE_ITEM}.
+     * The key TYPE, used in {@link #TYPE_ITEM}.
      */
-    String          EVENT_TYPE              = "EventType";
+    String          TYPE                    = "Type";
     
     /**
-     * Constant CREATED for the {@link #EVENT_TYPE}
+     * Constant CREATED for the {@link #TYPE}
      */
     String          CREATED                 = "CREATED";
     /**
-     * Constant CREATING for the {@link #EVENT_TYPE}
+     * Constant CREATING for the {@link #TYPE}
      */
     String          CREATING                = "CREATING";
     /**
-     * Constant DESTROYED for the {@link #EVENT_TYPE}
+     * Constant DESTROYED for the {@link #TYPE}
      */
     String          DESTROYED               = "DESTROYED";
     /**
-     * Constant DESTROYING for the {@link #EVENT_TYPE}
+     * Constant DESTROYING for the {@link #TYPE}
      */
     String          DESTROYING              = "DESTROYING";
     /**
-     * Constant FAILURE for the {@link #EVENT_TYPE}
+     * Constant FAILURE for the {@link #TYPE}
      */
     String          FAILURE                 = "FAILURE";
     /**
-     * Constant GRACE_PERIOD for the {@link #EVENT_TYPE}
+     * Constant GRACE_PERIOD for the {@link #TYPE}
      */
     String          GRACE_PERIOD            = "GRACE_PERIOD";
     /**
-     * Constant WAITING for the {@link #EVENT_TYPE}
+     * Constant WAITING for the {@link #TYPE}
      */
     String          WAITING                 = "WAITING";
     
     /**
      * The item containing the type of this event.
-     * The key is {@link #EVENT_TYPE}, and the type is {@link SimpleType#STRING}.
+     * The key is {@link #TYPE}, and the type is {@link SimpleType#STRING}.
      */
-    Item            EVENT_TYPE_ITEM         = new Item(
-                                                EVENT_TYPE,
-                                                "",
-                                                SimpleType.STRING,
-                                                CREATED, CREATING, DESTROYED, DESTROYING, FAILURE, GRACE_PERIOD, WAITING);    
+    Item            TYPE_ITEM               = new Item(
+                                                    TYPE,
+                                                    "",
+                                                    SimpleType.STRING,
+                                                    CREATED, CREATING, DESTROYED, DESTROYING, FAILURE, GRACE_PERIOD, WAITING);    
     
     /**
-     * The key TIMESTAMP, used in {@link #EVENT_TYPE_ITEM}.
+     * The key TIMESTAMP, used in {@link #TYPE_ITEM}.
      */    
     String          TIMESTAMP               = "Timestamp";
     
@@ -663,179 +121,90 @@
      * The key is {@link #TIMESTAMP}, and the type is {@link SimpleType#LONG}.
      */
     Item            TIMESTAMP_ITEM          = new Item(
-                                                TIMESTAMP,
-                                                "",
-                                                SimpleType.LONG);
+                                                    TIMESTAMP,
+                                                    "",
+                                                    SimpleType.LONG);
 
 
     /**
-     * The key MISSED_DEPENDENCIES, used in {@link #MISSED_DEPENDENCIES_ITEM}.
+     * The key DEPENDENCIES, used in {@link #DEPENDENCIES_ITEM}.
      */
-    String          MISSED_DEPENDENCIES     = "MissedDependencies";
+    String          DEPENDENCIES            = "Dependencies";
     
     /**
      * The item containing the filters identifying the missing dependencies that caused the WAITING, GRACE_PERIOD or FAILURE event.
-     * The key is {@link #MISSED_DEPENDENCIES}, and the type is {@link JmxConstants#STRING_ARRAY_TYPE}.
+     * The key is {@link #DEPENDENCIES}, and the type is {@link JmxConstants#STRING_ARRAY_TYPE}.
      */
-    Item            MISSED_DEPENDENCIES_ITEM         = new Item(
-                                                            MISSED_DEPENDENCIES,
-                                                            "",
-                                                            JmxConstants.STRING_ARRAY_TYPE);
+    Item            DEPENDENCIES_ITEM       = new Item(
+                                                    DEPENDENCIES,
+                                                    "",
+                                                    JmxConstants.STRING_ARRAY_TYPE);
         
     /**
-     * The key ERROR_MESSAGE, used in {@link #ERROR_MESSAGE_ITEM}.
+     * The key CAUSE, used in {@link #CAUSE_ITEM}.
      */    
-    String          ERROR_MESSAGE           = "ErrorMessage";
+    String          CAUSE                   = "ErrorMessage";
     
     /**
      * The item containing the error message for this FAILURE event.
-     * The key is {@link #ERROR_MESSAGE}, and the type is {@link SimpleType#STRING}.
+     * The key is {@link #Cause}, and the type is {@link SimpleType#STRING}.
      */
-    Item            ERROR_MESSAGE_ITEM      = new Item(
-                                                ERROR_MESSAGE,
-                                                "",
-                                                SimpleType.STRING);
+    Item            CAUSE_ITEM              = new Item(
+                                                    CAUSE,
+                                                    "",
+                                                    SimpleType.STRING);
     
     /**
      * The CompositeType for a blueprint event. It contains the following items:
      * <ul>
-     * <li>{@link #EVENT_BUNDLE}</li>
-     * <li>{@link #EVENT_EXTENDER_BUNDLE}</li>
-     * <li>{@link #EVENT_TYPE}</li>
+     * <li>{@link #BUNDLE}</li>
+     * <li>{@link #EXTENDER_BUNDLE}</li>
+     * <li>{@link #TYPE}</li>
      * <li>{@link #IS_REPLAY}</li>
      * <li>{@link #TIMESTAMP}</li>
-     * <li>{@link #MISSED_DEPENDENCIES}</li>
-     * <li>{@link #ERROR_MESSAGE}</li>
+     * <li>{@link #DEPENDENCIES}</li>
+     * <li>{@link #Cause}</li>
      * </ul>
      */
     CompositeType   BLUEPRINT_EVENT_TYPE    = Item.compositeType(
-                                                "BLUEPRINT_EVENT", 
-                                                "", 
-                                                EVENT_BUNDLE_ID_ITEM,
-                                                EVENT_EXTENDER_BUNDLE_ID_ITEM,
-                                                EVENT_TYPE_ITEM,
-                                                IS_REPLAY_ITEM,
-                                                TIMESTAMP_ITEM,
-                                                MISSED_DEPENDENCIES_ITEM,
-                                                ERROR_MESSAGE_ITEM);
-    
-    /**
-     * Returns the list of component id.
-     * 
-     * @param containerServiceId The blueprint container service id
-     * @return the array of component id
-     */
-    String[] getComponentIds(long containerServiceId);
-    
-    /**
-     * Returns all component ids of the specified component type
-     * 
-     * @param containerServiceId The blueprint container service id
-     * @param type The string used to specify the type of component
-     * @return the array of component id
-     */
-    String[] getComponentIdsByType(long containerServiceId, String type);
-    
-    /**
-     * Returns the BeanMetadata according to the its component id.
-     * The returned Composite Data is typed by {@link #BEAN_METADATA_TYPE}.
-     * 
-     * @param containerServiceId The blueprint container service id
-     * @param componentId The component id
-     * @return the BeanMetadata, see {@link #BEAN_METADATA_TYPE}
-     */
-    CompositeData getBeanMetadata(long containerServiceId, String componentId);
-    
-    /**
-     * Returns the ServiceMetadata according to the its component id.
-     * The returned Composite Data is typed by {@link #SERVICE_MATADATA_TYPE}.
-     * 
-     * @param containerServiceId The blueprint container service id
-     * @param componentId The component id
-     * @return the ServiceMetadata, see {@link #SERVICE_MATADATA_TYPE} 
-     */
-    CompositeData getServiceMetadata(long containerServiceId, String componentId);
-    
-    /**
-     * Returns the ReferenceMetadata according to the its component id.
-     * The returned Composite Data is typed by {@link #REFERENCE_METADATA_TYPE}.
-     * 
-     * @param containerServiceId The blueprint container service id
-     * @param componentId The component id
-     * @return the ReferenceMetadata, see {@link #REFERENCE_METADATA_TYPE}
-     */
-    CompositeData getReferenceMetadata(long containerServiceId, String componentId);
-    
-    /**
-     * Returns the ReferenceListMetadata according to the its component id.
-     * The returned Composite Data is typed by {@link #REFERENCE_LIST_METADATA_TYPE}.
-     * 
-     * @param containerServiceId The blueprint container service id
-     * @param componentId The component id
-     * @return the ReferenceListMetadata, see {@link #REFERENCE_LIST_METADATA_TYPE} 
-     */
-    CompositeData getReferenceListMetadata(long containerServiceId, String componentId);
-    
-    
-    /**
-     * Returns the arguments associated with a bean component in tabular form.
-     * 
-     * Each row of the returned table represents a single argument. The Tabular
-     * Data consists of Composite Data that is type by {@link #ARGUMENT_TYPE}.
-     * 
-     * @param containerServiceId The blueprint container service id
-     * @param componentId The component id
-     * @return the arguments associated with a bean component
-     */
-    TabularData getBeanArguments(long containerServiceId, String componentId);
-    
-    /**
-     * Returns the properties associated with a bean component in tabular form.
-     * 
-     * Each row of the returned table represents a single property. The Tabular
-     * Data consists of Composite Data that is type by {@link #PROPERTY_TYPE}.
-     * 
-     * @param containerServiceId The blueprint container service id
-     * @param componentId The component id
-     * @return the properties associated with a bean component
-     */
-    TabularData getBeanProperties(long containerServiceId, String componentId);
-    
-    /**
-     * Returns the properties associated with a service component in tabular form.
-     * 
-     * Each row of the returned table represents a single property. The Tabular
-     * Data consists of Composite Data that is type by {@link #PROPERTY_TYPE}.
-     * 
-     * @param containerServiceId The blueprint container service id
-     * @param componentId The component id
-     * @return the properties associated with a service component
-     */
-    TabularData getServiceProperties(long containerServiceId, String componentId);
-    
+                                                    "BLUEPRINT_EVENT", 
+                                                    "", 
+                                                    BUNDLE_ITEM,
+                                                    EXTENDER_BUNDLE_ITEM,
+                                                    TYPE_ITEM,
+                                                    IS_REPLAY_ITEM,
+                                                    TIMESTAMP_ITEM,
+                                                    DEPENDENCIES_ITEM,
+                                                    CAUSE_ITEM);
+        
     /**
      * Returns the BlueprintEvent associated with this blueprint container.
      * The returned Composite Data is typed by {@link #BLUEPRINT_EVENT_TYPE}.
      * 
-     * @param containerServiceId The blueprint container service id
+     * @param bundleId The bundle id of a blueprint bundle
      * @return the last event associated with the blueprint bundle, see {@link #BLUEPRINT_EVENT_TYPE} 
+     * @throws IOException if the operation fails
+     * @throws IllegalArgumentException if the bundle is not a blueprint bundle
      */
-    CompositeData getLastEvent(long containerServiceId);
+    CompositeData getLastEvent(long bundleId) throws IOException;
     
     /**
-     * Returns the blueprint container's service id if the bundle specified 
-     * by the bundle id is a blueprint bundle.
+     * Returns the BlueprintEvent associated with this blueprint container.
+     * The returned Composite Data is typed by {@link #BLUEPRINT_EVENT_TYPE}.
      * 
-     * @param bundleId The bundle id
-     * @return the blueprint container's service id, or null if the bundle is not a blueprint bundle
-     */
-    String getBlueprintContainerServiceId(long bundleId);
+     * @param bundleId The bundle id of a blueprint bundle
+     * @return the tabular representation of all the last events associated with the blueprint bundles
+     * @throws IOException if the operation fails
+     */ 
+    TabularData getLastEvents() throws IOException;
     
     /**
-     * Returns all the blueprint containers' service IDs.
+     * Returns all the blueprint bundles' IDs, which are either 
+     * successfully created or not by current extender.
      * 
-     * @return all the blueprint containers' service IDs 
+     * @return the list of all the blueprint bundles's IDs (either successfully created or not by current extender)
+     * @throws IOException if the operation fails
      */
-    String[] getAllBlueprintContainerServiceIds();
+    long[] getBlueprintBundleIds() throws IOException;
     
 }



Mime
View raw message