Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBJ Hargrave2014-01-31 17:23:49 +0000
committerBJ Hargrave2014-02-03 21:53:15 +0000
commit421014afbbbe68b5f589ed8c05a94242f94d3381 (patch)
tree1f2271154a39dba6b8b768ea1c32634291453dcd /bundles/org.eclipse.osgi/osgi/src/org
parentdfab51395599c4dac0341a1432684eadbe4aba5d (diff)
downloadrt.equinox.framework-421014afbbbe68b5f589ed8c05a94242f94d3381.tar.gz
rt.equinox.framework-421014afbbbe68b5f589ed8c05a94242f94d3381.tar.xz
rt.equinox.framework-421014afbbbe68b5f589ed8c05a94242f94d3381.zip
Bug 427332: dto: Remove cycles in wiring DTOs and add identifiers
The set of referenced DTOs is pushed up to the top level BundleWiringDTO and each DTO is assigned a transient identifier that can be used as a reference by other DTOs. The transient identifier used is the identity hash code of the underlying runtime object. Since CapabilityDTO and RequirementDTO object can be large, due to the contained directives and attributes maps, we change to use ref DTOs in the wiring DTO types. The ref DTOs refer to the CapabilityDTO/ RequirementDTO objects in the BundleRevisionDTO. Signed-off-by: BJ Hargrave <hargrave@us.ibm.com>
Diffstat (limited to 'bundles/org.eclipse.osgi/osgi/src/org')
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/BundleDTO.java12
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/ServiceReferenceDTO.java7
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/startlevel/BundleStartLevelDTO.java13
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/startlevel/FrameworkStartLevelDTO.java6
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/wiring/BundleRevisionDTO.java11
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/wiring/BundleWireDTO.java21
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/wiring/BundleWiringDTO.java69
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/resource/CapabilityDTO.java17
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/resource/CapabilityRefDTO.java41
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/resource/RequirementDTO.java17
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/resource/RequirementRefDTO.java41
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/resource/ResourceDTO.java14
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/resource/WireDTO.java22
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/resource/WiringDTO.java34
14 files changed, 249 insertions, 76 deletions
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/BundleDTO.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/BundleDTO.java
index 6471333eb..93ea5712c 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/BundleDTO.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/BundleDTO.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2012, 2014). 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.
@@ -31,25 +31,25 @@ public class BundleDTO extends DTO {
/**
* The bundle's unique identifier.
*/
- public long id;
+ public long id;
/**
* The time when the bundle was last modified.
*/
- public long lastModified;
+ public long lastModified;
/**
* The bundle's state.
*/
- public int state;
+ public int state;
/**
* The bundle's symbolic name.
*/
- public String symbolicName;
+ public String symbolicName;
/**
* The bundle's version.
*/
- public String version;
+ public String version;
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/ServiceReferenceDTO.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/ServiceReferenceDTO.java
index e6b81ae56..e0a54dbaa 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/ServiceReferenceDTO.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/ServiceReferenceDTO.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2012, 2014). 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.
@@ -35,6 +35,11 @@ import org.osgi.dto.DTO;
*/
public class ServiceReferenceDTO extends DTO {
/**
+ * The {@code service.id} of the service.
+ */
+ public long id;
+
+ /**
* The id of the bundle that registered the service.
*/
public long bundle;
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/startlevel/BundleStartLevelDTO.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/startlevel/BundleStartLevelDTO.java
index 7617fe966..6fb563a3c 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/startlevel/BundleStartLevelDTO.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/startlevel/BundleStartLevelDTO.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2012, 2014). 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.
@@ -30,18 +30,23 @@ import org.osgi.dto.DTO;
*/
public class BundleStartLevelDTO extends DTO {
/**
+ * The id of the bundle associated with this start level.
+ */
+ public long bundle;
+
+ /**
* The assigned start level value for the bundle.
*/
- public int startLevel;
+ public int startLevel;
/**
* The bundle's autostart setting indicates that the activation policy
* declared in the bundle manifest must be used.
*/
- public boolean activationPolicyUsed;
+ public boolean activationPolicyUsed;
/**
* The bundle's autostart setting indicates it must be started.
*/
- public boolean persistentlyStarted;
+ public boolean persistentlyStarted;
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/startlevel/FrameworkStartLevelDTO.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/startlevel/FrameworkStartLevelDTO.java
index a59fb0cee..5025710fa 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/startlevel/FrameworkStartLevelDTO.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/startlevel/FrameworkStartLevelDTO.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2012, 2014). 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.
@@ -32,11 +32,11 @@ public class FrameworkStartLevelDTO extends DTO {
/**
* The active start level value for the framework.
*/
- public int startLevel;
+ public int startLevel;
/**
* The initial start level value that is assigned to a bundle when it is
* first installed.
*/
- public int initialBundleStartLevel;
+ public int initialBundleStartLevel;
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/wiring/BundleRevisionDTO.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/wiring/BundleRevisionDTO.java
index 918ab5213..5ffceceb8 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/wiring/BundleRevisionDTO.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/wiring/BundleRevisionDTO.java
@@ -16,7 +16,6 @@
package org.osgi.dto.framework.wiring;
-import org.osgi.dto.framework.BundleDTO;
import org.osgi.dto.resource.ResourceDTO;
/**
@@ -35,20 +34,20 @@ public class BundleRevisionDTO extends ResourceDTO {
/**
* The symbolic name of the bundle revision.
*/
- public String symbolicName;
+ public String symbolicName;
/**
* The type of the bundle revision.
*/
- public int type;
+ public int type;
/**
* The version of the bundle revision.
*/
- public String version;
+ public String version;
/**
- * The bundle associated with this bundle revision.
+ * The id of the bundle associated with the bundle revision.
*/
- public BundleDTO bundle;
+ public long bundle;
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/wiring/BundleWireDTO.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/wiring/BundleWireDTO.java
index 039e517c3..71ad728ad 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/wiring/BundleWireDTO.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/wiring/BundleWireDTO.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2012, 2014). 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.
@@ -17,28 +17,29 @@
package org.osgi.dto.framework.wiring;
import org.osgi.dto.resource.WireDTO;
+import org.osgi.dto.resource.WiringDTO;
/**
* Data Transfer Object for a BundleWire.
*
* <p>
- * {@code BundleWireDTO}s can be obtained from a {@link BundleWiringDTO}.
- *
- * <p>
- * The {@link WireDTO#requirer requirer} and {@link WireDTO#provider provider}
- * fields must contain {@link BundleRevisionDTO}s.
+ * {@code BundleWireDTO}s are referenced {@link BundleWiringDTO.NodeDTO}s.
*
* @author $Id$
* @NotThreadSafe
*/
public class BundleWireDTO extends WireDTO {
/**
- * Provider wiring for the bundle wire.
+ * The identifier of the provider wiring for the bundle wire.
+ *
+ * @see WiringDTO#id
*/
- public BundleWiringDTO providerWiring;
+ public int providerWiring;
/**
- * Requirer wiring for the bundle wire.
+ * The identifier of the requiring wiring for the bundle wire.
+ *
+ * @see WiringDTO#id
*/
- public BundleWiringDTO requirerWiring;
+ public int requirerWiring;
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/wiring/BundleWiringDTO.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/wiring/BundleWiringDTO.java
index ba026e560..aa30c24c4 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/wiring/BundleWiringDTO.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/framework/wiring/BundleWiringDTO.java
@@ -16,10 +16,12 @@
package org.osgi.dto.framework.wiring;
+import java.util.Set;
+import org.osgi.dto.DTO;
import org.osgi.dto.resource.WiringDTO;
/**
- * Data Transfer Object for a BundleWiring.
+ * Data Transfer Object for a BundleWiring graph.
*
* <p>
* An installed Bundle can be adapted to provide a {@code BundleWiringDTO} for
@@ -27,27 +29,62 @@ import org.osgi.dto.resource.WiringDTO;
* wirings of the Bundle can be obtained by adapting the bundle to
* {@code BundleWiringDTO[]}.
*
- * <p>
- * The {@link WiringDTO#providedWires providedWires} field must contain an array
- * of {@link BundleWireDTO}s. The {@link WiringDTO#requiredWires requiredWires}
- * field must contain an array of {@link BundleWireDTO}s. The
- * {@link WiringDTO#resource resource} field must contain a
- * {@link BundleRevisionDTO}.
- *
* @author $Id$
* @NotThreadSafe
*/
-public class BundleWiringDTO extends WiringDTO {
+public class BundleWiringDTO extends DTO {
+ /**
+ * The id of the bundle associated with the bundle wiring graph.
+ */
+ public long bundle;
+
+ /**
+ * The identifier of the root wiring node of the bundle wiring graph.
+ *
+ * @see WiringDTO#id
+ */
+ public int root;
+
+ /**
+ * The set of wiring nodes referenced by the wiring graph.
+ *
+ * <p>
+ * All wiring nodes referenced by wiring node identifiers in the wiring
+ * graph are contained in this set.
+ */
+ public Set<NodeDTO> nodes;
+
/**
- * The bundle wiring's in use setting indicates that the bundle wiring is in
- * use.
+ * The set of resources referenced by the wiring graph.
+ *
+ * <p>
+ * All resources referenced by resource identifiers in the wiring graph are
+ * contained in this set.
*/
- public boolean inUse;
+ public Set<BundleRevisionDTO> resources;
/**
- * The current state of the bundle wiring. The bundle wiring's current
- * setting indicates that the bundle wiring is the current bundle wiring for
- * the bundle.
+ * Data Transfer Object for a BundleWiring node.
+ *
+ * <p>
+ * The {@link WiringDTO#providedWires providedWires} field must contain an
+ * array of {@link BundleWireDTO}s. The {@link WiringDTO#requiredWires
+ * requiredWires} field must contain an array of {@link BundleWireDTO}s.
+ *
+ * @NotThreadSafe
*/
- public boolean current;
+ public static class NodeDTO extends WiringDTO {
+ /**
+ * The bundle wiring's in use setting indicates that the bundle wiring
+ * is in use.
+ */
+ public boolean inUse;
+
+ /**
+ * The current state of the bundle wiring. The bundle wiring's current
+ * setting indicates that the bundle wiring is the current bundle wiring
+ * for the bundle.
+ */
+ public boolean current;
+ }
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/resource/CapabilityDTO.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/resource/CapabilityDTO.java
index 9fc982a5b..4fa2c2d19 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/resource/CapabilityDTO.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/resource/CapabilityDTO.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2012, 2014). 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.
@@ -27,6 +27,14 @@ import org.osgi.dto.DTO;
*/
public class CapabilityDTO extends DTO {
/**
+ * The unique identifier of the capability.
+ *
+ * <p>
+ * This identifier is transiently assigned and may vary across restarts.
+ */
+ public int id;
+
+ /**
* The namespace for the capability.
*/
public String namespace;
@@ -39,13 +47,16 @@ public class CapabilityDTO extends DTO {
/**
* The attributes for the capability.
*
+ * <p>
* The value type must be a numerical type, Boolean, String, DTO or an array
* of any of the former.
*/
public Map<String, Object> attributes;
/**
- * The resource declaring this capability.
+ * The identifier of the resource declaring the capability.
+ *
+ * @see ResourceDTO#id
*/
- public ResourceDTO resource;
+ public int resource;
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/resource/CapabilityRefDTO.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/resource/CapabilityRefDTO.java
new file mode 100644
index 000000000..8ee4a6d04
--- /dev/null
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/resource/CapabilityRefDTO.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) OSGi Alliance (2014). 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.osgi.dto.resource;
+
+import org.osgi.dto.DTO;
+
+/**
+ * Data Transfer Object for a reference to a Capability.
+ *
+ * @author $Id$
+ * @NotThreadSafe
+ */
+public class CapabilityRefDTO extends DTO {
+ /**
+ * The identifier of the capability in the resource.
+ *
+ * @see CapabilityDTO#id
+ */
+ public int capability;
+
+ /**
+ * The identifier of the resource declaring the capability.
+ *
+ * @see ResourceDTO#id
+ */
+ public int resource;
+}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/resource/RequirementDTO.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/resource/RequirementDTO.java
index 0cbd58c89..0c54329af 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/resource/RequirementDTO.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/resource/RequirementDTO.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2012, 2014). 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.
@@ -27,6 +27,14 @@ import org.osgi.dto.DTO;
*/
public class RequirementDTO extends DTO {
/**
+ * The unique identifier of the requirement.
+ *
+ * <p>
+ * This identifier is transiently assigned and may vary across restarts.
+ */
+ public int id;
+
+ /**
* The namespace for the requirement.
*/
public String namespace;
@@ -39,13 +47,16 @@ public class RequirementDTO extends DTO {
/**
* The attributes for the requirement.
*
+ * <p>
* The value type must be a numerical type, Boolean, String, DTO or an array
* of any of the former.
*/
public Map<String, Object> attributes;
/**
- * The resource declaring this requirement.
+ * The identifier of the resource declaring the requirement.
+ *
+ * @see ResourceDTO#id
*/
- public ResourceDTO resource;
+ public int resource;
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/resource/RequirementRefDTO.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/resource/RequirementRefDTO.java
new file mode 100644
index 000000000..3c4f2a732
--- /dev/null
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/resource/RequirementRefDTO.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) OSGi Alliance (2014). 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.osgi.dto.resource;
+
+import org.osgi.dto.DTO;
+
+/**
+ * Data Transfer Object for a reference to a Requirement.
+ *
+ * @author $Id$
+ * @NotThreadSafe
+ */
+public class RequirementRefDTO extends DTO {
+ /**
+ * The identifier of the requirement in the resource.
+ *
+ * @see RequirementDTO#id
+ */
+ public int requirement;
+
+ /**
+ * The identifier of the resource declaring the requirement.
+ *
+ * @see ResourceDTO#id
+ */
+ public int resource;
+}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/resource/ResourceDTO.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/resource/ResourceDTO.java
index fdc4a5c7c..10cdb8417 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/resource/ResourceDTO.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/resource/ResourceDTO.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2012, 2014). 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.
@@ -27,12 +27,20 @@ import org.osgi.dto.DTO;
*/
public class ResourceDTO extends DTO {
/**
- * The capabilities for the resource.
+ * The unique identifier of the resource.
+ *
+ * <p>
+ * This identifier is transiently assigned and may vary across restarts.
+ */
+ public int id;
+
+ /**
+ * The capabilities of the resource.
*/
public List<CapabilityDTO> capabilities;
/**
- * The requirements for the resource.
+ * The requirements of the resource.
*/
public List<RequirementDTO> requirements;
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/resource/WireDTO.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/resource/WireDTO.java
index 31ddb9fa4..c7dce0c97 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/resource/WireDTO.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/resource/WireDTO.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2012, 2014). 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.
@@ -26,22 +26,26 @@ import org.osgi.dto.DTO;
*/
public class WireDTO extends DTO {
/**
- * Capability for the wire.
+ * Reference to the Capability for the wire.
*/
- public CapabilityDTO capability;
+ public CapabilityRefDTO capability;
/**
- * Requirement for the wire.
+ * Reference to the Requirement for the wire.
*/
- public RequirementDTO requirement;
+ public RequirementRefDTO requirement;
/**
- * Provider resource for the wire.
+ * The identifier of the provider resource for the wire.
+ *
+ * @see ResourceDTO#id
*/
- public ResourceDTO provider;
+ public int provider;
/**
- * Requiring resource for the wire.
+ * The identifier of the requiring resource for the wire.
+ *
+ * @see ResourceDTO#id
*/
- public ResourceDTO requirer;
+ public int requirer;
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/resource/WiringDTO.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/resource/WiringDTO.java
index a92b905ff..f39e72a27 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/resource/WiringDTO.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/dto/resource/WiringDTO.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2012, 2014). 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.
@@ -20,34 +20,44 @@ import java.util.List;
import org.osgi.dto.DTO;
/**
- * Data Transfer Object for a Wiring.
+ * Data Transfer Object for a Wiring node.
*
* @author $Id$
* @NotThreadSafe
*/
public class WiringDTO extends DTO {
/**
- * The capabilities for the wiring.
+ * The unique identifier of the wiring node.
+ *
+ * <p>
+ * This identifier is transiently assigned and may vary across restarts.
*/
- public List<CapabilityDTO> capabilities;
+ public int id;
/**
- * The requirements for the wiring.
+ * The references to the capabilities for the wiring node.
*/
- public List<RequirementDTO> requirements;
+ public List<CapabilityRefDTO> capabilities;
/**
- * The provided wires for the wiring.
+ * The references to the requirements for the wiring node.
*/
- public List<WireDTO> providedWires;
+ public List<RequirementRefDTO> requirements;
/**
- * The required wires for the wiring.
+ * The provided wires for the wiring node.
*/
- public List<WireDTO> requiredWires;
+ public List<WireDTO> providedWires;
/**
- * Resource for the wiring.
+ * The required wires for the wiring node.
*/
- public ResourceDTO resource;
+ public List<WireDTO> requiredWires;
+
+ /**
+ * The identifier of the resource associated with the wiring node.
+ *
+ * @see ResourceDTO#id
+ */
+ public int resource;
}

Back to the top