Package org.osgi.service.subsystem

Examples of org.osgi.service.subsystem.SubsystemException


  void addedConstituent(Resource resource, boolean referenced) {
    try {
      setDeploymentManifest(new DeploymentManifest.Builder()
          .manifest(getDeploymentManifest()).content(resource, referenced).build());
    } catch (Exception e) {
      throw new SubsystemException(e);
    }
  }
View Full Code Here


  void addedParent(BasicSubsystem subsystem, boolean referenceCount) {
    try {
      setDeploymentManifest(new DeploymentManifest.Builder()
          .manifest(getDeploymentManifest()).parent(subsystem, referenceCount).build());
    } catch (Exception e) {
      throw new SubsystemException(e);
    }
  }
View Full Code Here

    if (deploymentManifest == null) {
      try {
        deploymentManifest = new DeploymentManifest(directory.getFile("OSGI-INF/DEPLOYMENT.MF").open());
      }
      catch (Throwable t) {
        throw new SubsystemException(t);
      }
    }
    return deploymentManifest;
  }
View Full Code Here

  File getDirectory() {
    try {
      return new File(directory.toURL().toURI());
    }
    catch (Exception e) {
      throw new SubsystemException(e);
    }
  }
View Full Code Here

    if (resource == null) {
      try {
        resource = new SubsystemResource(directory);
      }
      catch (Exception e) {
        throw new SubsystemException(e);
      }
      Collection<DeployedContentHeader.Clause> missingResources = resource.getMissingResources();
      if (!missingResources.isEmpty()) {
        if (isRoot())
          // We don't care if the root subsystem has missing resources
          // because they are either (1) extraneous bundles outside of
          // the subsystems API or (2) provisioned dependencies of
          // other subsystems. Those that fall in the latter category
          // will be detected by the dependent subsystems.
          removedContent(missingResources);
        else
          // If a non-root subsystem has missing dependencies, let's
          // fail fast for now.
          throw new SubsystemException("Missing resources: " + missingResources);
      }
    }
    return resource;
  }
View Full Code Here

    if (subsystemManifest == null) {
      try {
        subsystemManifest = new SubsystemManifest(directory.getFile("OSGI-INF/SUBSYSTEM.MF").open());
      }
      catch (Throwable t) {
        throw new SubsystemException(t);
      }
    }
    return subsystemManifest;
  }
View Full Code Here

    if (!clauses.isEmpty())
      builder.header(new DeployedContentHeader(clauses));
    try {
      setDeploymentManifest(builder.build());
    } catch (Exception e) {
      throw new SubsystemException(e);
    }
  }
View Full Code Here

  void setAutostart(boolean value) {
    try {
      setDeploymentManifest(new DeploymentManifest.Builder()
          .manifest(getDeploymentManifest()).autostart(value).build());
    } catch (Exception e) {
      throw new SubsystemException(e);
    }
  }
View Full Code Here

      return;
    try {
      setDeploymentManifest(new DeploymentManifest.Builder()
          .manifest(getDeploymentManifest()).state(value).build());
    } catch (Exception e) {
      throw new SubsystemException(e);
    }
    Activator.getInstance().getSubsystemServiceRegistrar().update(this);
    synchronized (this) {
      notifyAll();
    }
View Full Code Here

    RegionUpdater updater = new RegionUpdater(getRegion(), ((BasicSubsystem)getParents().iterator().next()).getRegion());
    try {
      updater.addRequirements(requirements);
    }
    catch (Exception e) {
      throw new SubsystemException(e);
    }
  }
View Full Code Here

TOP

Related Classes of org.osgi.service.subsystem.SubsystemException

Copyright © 2018 www.massapicom. 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.