Examples of ResolveContext


Examples of org.jboss.gravia.resolver.ResolveContext

        // Sanity check that we can resolve all result resources
        Set<Resource> mandatory = new LinkedHashSet<Resource>();
        mandatory.addAll(result.getResources());
        try {
            ResolveContext context = new DefaultResolveContext(envclone, mandatory, null);
            resolver.resolve(context).entrySet();
        } catch (ResolutionException ex) {
            LOGGER.warn("Cannot resolve provisioner result", ex);
        }
View Full Code Here

Examples of org.jboss.gravia.resolver.ResolveContext

    private void resolveInEnvironment(Environment env, List<Resource> unresolved, Map<Requirement, Resource> mapping, Set<Requirement> unstatisfied, List<Resource> resources) {
        Set<Resource> mandatory = new LinkedHashSet<Resource>();
        mandatory.addAll(unresolved);
        mandatory.addAll(resources);
        try {
            ResolveContext context = new DefaultResolveContext(env, mandatory, null);
            Set<Entry<Resource, List<Wire>>> wiremap = resolver.resolve(context).entrySet();
            for (Entry<Resource, List<Wire>> entry : wiremap) {
                for (Wire wire : entry.getValue()) {
                    Requirement req = wire.getRequirement();
                    Resource provider = wire.getProvider();
View Full Code Here

Examples of org.jboss.gravia.resolver.ResolveContext

        // Sanity check that we can resolve all result resources
        Set<Resource> mandatory = new LinkedHashSet<Resource>();
        mandatory.addAll(result.getResources());
        try {
            ResolveContext context = new DefaultResolveContext(envclone, mandatory, null);
            resolver.resolveAndApply(context).entrySet();
        } catch (ResolutionException ex) {
            LOGGER.warn("Cannot resolve provisioner result", ex);
        }
View Full Code Here

Examples of org.jboss.gravia.resolver.ResolveContext

    private void resolveInEnvironment(Environment env, List<Resource> unresolved, Map<Requirement, Resource> mapping, Set<Requirement> unstatisfied, List<Resource> resources) {
        Set<Resource> mandatory = new LinkedHashSet<Resource>();
        mandatory.addAll(unresolved);
        mandatory.addAll(resources);
        try {
            ResolveContext context = new DefaultResolveContext(env, mandatory, null);
            Set<Entry<Resource, List<Wire>>> wiremap = resolver.resolve(context).entrySet();
            for (Entry<Resource, List<Wire>> entry : wiremap) {
                for (Wire wire : entry.getValue()) {
                    Requirement req = wire.getRequirement();
                    Resource provider = wire.getProvider();
View Full Code Here

Examples of org.jboss.gravia.resolver.ResolveContext

        ResourceSpace resspace = spaces.getResourceSpace(res);
        if (resspace != null)
            return resspace;

        // A resource can resolve when the spaces of all its immediate dependencies can be added
        ResolveContext context = state.getResolveContext();
        ResourceCandidates rescan = new ResourceCandidates(res);
        Iterator<List<Wire>> itres = rescan.iterator(context);
        while (itres.hasNext()) {
            Wiring wiring = context.getWirings().get(res);
            ResourceSpace space = new ResourceSpace(res, wiring);
            List<Wire> wires = itres.next();
            boolean allgood = true;
            for (Wire wire : wires) {
                Resource provider = wire.getProvider();
View Full Code Here

Examples of org.jboss.gravia.resolver.ResolveContext

        ResourceSpace resspace = spaces.getResourceSpace(res);
        if (resspace != null)
            return resspace;

        // A resource can resolve when the spaces of all its immediate dependencies can be added
        ResolveContext context = state.getResolveContext();
        ResourceCandidates rescan = new ResourceCandidates(res);
        Iterator<List<Wire>> itres = rescan.iterator(context);
        while (itres.hasNext()) {
            Wiring wiring = context.getWirings().get(res);
            ResourceSpace space = new ResourceSpace(res, wiring);
            List<Wire> wires = itres.next();
            boolean allgood = true;
            for (Wire wire : wires) {
                Resource provider = wire.getProvider();
View Full Code Here

Examples of org.jboss.gravia.resolver.ResolveContext

        // Sanity check that we can resolve all result resources
        Set<Resource> mandatory = new LinkedHashSet<Resource>();
        mandatory.addAll(result.getResources());
        try {
            ResolveContext context = new DefaultResolveContext(envclone, mandatory, null);
            resolver.resolveAndApply(context).entrySet();
        } catch (ResolutionException ex) {
            LOGGER.warn("Cannot resolve provisioner result", ex);
        }
View Full Code Here

Examples of org.jboss.gravia.resolver.ResolveContext

    private void resolveInEnvironment(Environment env, List<Resource> unresolved, Map<Requirement, Resource> mapping, Set<Requirement> unstatisfied, List<Resource> resources) {
        Set<Resource> mandatory = new LinkedHashSet<Resource>();
        mandatory.addAll(unresolved);
        mandatory.addAll(resources);
        try {
            ResolveContext context = new DefaultResolveContext(env, mandatory, null);
            Set<Entry<Resource, List<Wire>>> wiremap = resolver.resolve(context).entrySet();
            for (Entry<Resource, List<Wire>> entry : wiremap) {
                for (Wire wire : entry.getValue()) {
                    Requirement req = wire.getRequirement();
                    Resource provider = wire.getProvider();
View Full Code Here

Examples of org.osgi.service.resolver.ResolveContext

      return digraph.createRegion(name);
    return region;
  }
 
  private ResolveContext createResolveContext() {
    return new ResolveContext() {
      private final Map<Resource, Wiring> wirings = computeWirings();
     
      private Map<Resource, Wiring> computeWirings() {
        Map<Resource, Wiring> wirings = new HashMap<Resource, Wiring>();
        for (BasicSubsystem subsystem : Activator.getInstance().getSubsystems().getSubsystems())
View Full Code Here

Examples of org.osgi.service.resolver.ResolveContext

        List<org.osgi.service.repository.Repository> repos = new ArrayList<org.osgi.service.repository.Repository>();
        repos.add(new StaticRepository(resources.values()));
        repos.addAll(resourceRepos);

        ResolverImpl resolver = new ResolverImpl(new Slf4jResolverLog(LOGGER));
        ResolveContext context = new ResolveContextImpl(
                Collections.<Resource>singleton(requirements),
                Collections.<Resource>emptySet(),
                new AggregateRepository(repos),
                resolveOptionalImports);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.