Search in sources :

Example 1 with FrameworkWiringDTO

use of org.osgi.framework.wiring.dto.FrameworkWiringDTO in project felix by apache.

the class DTOFactory method createFrameworkWiringDTO.

private static FrameworkWiringDTO createFrameworkWiringDTO(Felix framework) {
    FrameworkWiringDTO dto = new FrameworkWiringDTO();
    dto.resources = new HashSet<BundleRevisionDTO>();
    dto.wirings = new HashSet<NodeDTO>();
    Set<Bundle> bundles = new LinkedHashSet<Bundle>(Arrays.asList(framework.getBundles()));
    bundles.addAll(framework.getRemovalPendingBundles());
    for (Bundle bundle : bundles) {
        addBundleWiring(bundle, dto.resources, dto.wirings);
    }
    return dto;
}
Also used : LinkedHashSet(java.util.LinkedHashSet) BundleRevisionDTO(org.osgi.framework.wiring.dto.BundleRevisionDTO) Bundle(org.osgi.framework.Bundle) NodeDTO(org.osgi.framework.wiring.dto.BundleWiringDTO.NodeDTO) FrameworkWiringDTO(org.osgi.framework.wiring.dto.FrameworkWiringDTO)

Aggregations

LinkedHashSet (java.util.LinkedHashSet)1 Bundle (org.osgi.framework.Bundle)1 BundleRevisionDTO (org.osgi.framework.wiring.dto.BundleRevisionDTO)1 NodeDTO (org.osgi.framework.wiring.dto.BundleWiringDTO.NodeDTO)1 FrameworkWiringDTO (org.osgi.framework.wiring.dto.FrameworkWiringDTO)1