aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject svn commit: r1221306 - in /aries/trunk/sandbox/jmx-next/jmx-api/src/main/java/org/osgi/jmx: Item.java framework/wiring/BundleWiringStateMBean.java
Date Tue, 20 Dec 2011 15:04:23 GMT
Author: davidb
Date: Tue Dec 20 15:04:23 2011
New Revision: 1221306

URL: http://svn.apache.org/viewvc?rev=1221306&view=rev
Log:
Generification of BundleWiringStateMBean.

Modified:
    aries/trunk/sandbox/jmx-next/jmx-api/src/main/java/org/osgi/jmx/Item.java
    aries/trunk/sandbox/jmx-next/jmx-api/src/main/java/org/osgi/jmx/framework/wiring/BundleWiringStateMBean.java

Modified: aries/trunk/sandbox/jmx-next/jmx-api/src/main/java/org/osgi/jmx/Item.java
URL: http://svn.apache.org/viewvc/aries/trunk/sandbox/jmx-next/jmx-api/src/main/java/org/osgi/jmx/Item.java?rev=1221306&r1=1221305&r2=1221306&view=diff
==============================================================================
--- aries/trunk/sandbox/jmx-next/jmx-api/src/main/java/org/osgi/jmx/Item.java (original)
+++ aries/trunk/sandbox/jmx-next/jmx-api/src/main/java/org/osgi/jmx/Item.java Tue Dec 20 15:04:23
2011
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) OSGi Alliance (2009). All Rights Reserved.
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -29,18 +29,18 @@ import javax.management.openmbean.Tabula
 /**
  * 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 {@link CompositeType}, {@link TabularType}, and {@link ArrayType}.
  * The normal creation throws a checked exception, making it impossible to use
  * them in a static initializer. They 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.
- * 
+ *
  * @version $Rev$
  * @Immutable
  */
@@ -64,7 +64,7 @@ public class Item {
 	/**
 	 * Create a triple of name, description, and type. This triplet is used in
 	 * the creation of a Composite Type.
-	 * 
+	 *
 	 * @param name
 	 *            The name of the item.
 	 * @param description
@@ -82,12 +82,12 @@ public class Item {
 	}
 
 	/**
-	 * 
+	 *
 	 */
 
 	/**
 	 * Create a Tabular Type.
-	 * 
+	 *
 	 * @param name
 	 *            The name of the Tabular Type.
 	 * @param description
@@ -111,7 +111,7 @@ public class Item {
 
 	/**
 	 * Create a Composite Type
-	 * 
+	 *
 	 * @param name
 	 *            The name of the Tabular Type.
 	 * @param description
@@ -129,16 +129,16 @@ public class Item {
 
 	/**
 	 * Return a new Array Type.
-	 * 
+	 *
 	 * @param dim
 	 *            The dimension
 	 * @param elementType
 	 *            The element type
 	 * @return A new Array Type
 	 */
-	public static ArrayType arrayType(int dim, OpenType elementType) {
+	public static <T extends OpenType<?>> ArrayType<T> arrayType(int dim,
T elementType) {
 		try {
-			return new ArrayType(dim, elementType);
+			return new ArrayType<T>(dim, elementType);
 		} catch (OpenDataException e) {
 			throw new RuntimeException(e);
 		}
@@ -147,7 +147,7 @@ public class Item {
 	/**
 	 * Extend a Composite Type by adding new items. Items can override items in
 	 * the parent type.
-	 * 
+	 *
 	 * @param parent
 	 *            The parent type, can be <code>null</code>
 	 * @param name

Modified: aries/trunk/sandbox/jmx-next/jmx-api/src/main/java/org/osgi/jmx/framework/wiring/BundleWiringStateMBean.java
URL: http://svn.apache.org/viewvc/aries/trunk/sandbox/jmx-next/jmx-api/src/main/java/org/osgi/jmx/framework/wiring/BundleWiringStateMBean.java?rev=1221306&r1=1221305&r2=1221306&view=diff
==============================================================================
--- aries/trunk/sandbox/jmx-next/jmx-api/src/main/java/org/osgi/jmx/framework/wiring/BundleWiringStateMBean.java
(original)
+++ aries/trunk/sandbox/jmx-next/jmx-api/src/main/java/org/osgi/jmx/framework/wiring/BundleWiringStateMBean.java
Tue Dec 20 15:04:23 2011
@@ -131,7 +131,7 @@ public interface BundleWiringStateMBean 
 
     /**
      * Describes the live association between a provider of
-     *  a capability and a requirer of the corresponding requirement.
+     * a capability and a requirer of the corresponding requirement.
      */
     CompositeType BUNDLE_WIRE_TYPE =
         Item.compositeType("BUNDLE_WIRE",
@@ -143,7 +143,7 @@ public interface BundleWiringStateMBean 
                 REQUIRER_BUNDLE_ID_ITEM,
                 REQUIRER_BUNDLE_REVISION_ID_ITEM
                 );
-    ArrayType BUNDLE_WIRES_TYPE_ARRAY =
+    ArrayType<CompositeType> BUNDLE_WIRES_TYPE_ARRAY =
         Item.arrayType(1, BUNDLE_WIRE_TYPE);
 
     String BUNDLE_REVISION_ID = "BundleRevisionId";
@@ -156,9 +156,9 @@ public interface BundleWiringStateMBean 
             "The bundle identifier of the bundle revision",
             SimpleType.LONG);
 
-    ArrayType REQUIREMENT_TYPE_ARRAY =
+    ArrayType<CompositeType> REQUIREMENT_TYPE_ARRAY =
         Item.arrayType(1, BUNDLE_REQUIREMENT_TYPE);
-    ArrayType CAPABILITY_TYPE_ARRAY =
+    ArrayType<CompositeType> CAPABILITY_TYPE_ARRAY =
         Item.arrayType(1, BUNDLE_CAPABILITY_TYPE);
 
     String REQUIREMENTS = "Requirements";
@@ -210,28 +210,17 @@ public interface BundleWiringStateMBean 
     CompositeType BUNDLE_WIRING_TYPE =
         Item.compositeType("BUNDLE_WIRING",
                 "Describes the runtime association between a provider and a requirer",
-                BUNDLE_ID_ITEM,               /* Long */
-                BUNDLE_REVISION_ID_ITEM,      /* Integer (local scope) */
-                REQUIREMENTS_ITEM,            /* REQUIREMENT_TYPE [] */
-                CAPABILITIES_ITEM,            /* CAPABILITIES_TYPE [] */
-                REQUIRED_WIRES_ITEM,          /* BUNDLE_WIRE_TYPE [] */
-                PROVIDED_WIRES_ITEM           /* BUNDLE_WIRE_TYPE [] */
-                );
+                BUNDLE_ID_ITEM,
+                BUNDLE_REVISION_ID_ITEM,
+                REQUIREMENTS_ITEM,
+                CAPABILITIES_ITEM,
+                REQUIRED_WIRES_ITEM,
+                PROVIDED_WIRES_ITEM);
     TabularType REVISIONS_BUNDLE_WIRING_TYPE =
         Item.tabularType("REVISIONS_BUNDLE_WIRING",
             "The bundle wiring for all bundle revisions",
             BUNDLE_WIRING_TYPE,
             BUNDLE_ID, BUNDLE_REVISION_ID);
-    /*
-    ArrayType BUNDLE_WIRING_TYPE_ARRAY =
-        Item.arrayType(1, BUNDLE_WIRING_TYPE);
-
-    ArrayType REVISIONS_REQUIREMENT_TYPE_ARRAY =
-        Item.arrayType(2, BUNDLE_REQUIREMENT_TYPE);
-
-    ArrayType REVISIONS_CAPABILITY_TYPE_ARRAY =
-        Item.arrayType(2, BUNDLE_CAPABILITY_TYPE);
-    */
 
     TabularType BUNDLE_WIRING_CLOSURE_TYPE = Item.tabularType("BUNDLE_WIRING_CLOSURE",
             "A table of bundle wirings describing a full wiring closure",



Mime
View raw message