Package org.osgi.service.subsystem.Subsystem

Examples of org.osgi.service.subsystem.Subsystem.State


    this.instigator = instigator;
  }
 
  @Override
  public Object run() {
    State state = target.getState();
    // The following states are illegal.
    if (EnumSet.of(State.INSTALL_FAILED, State.UNINSTALLED, State.UNINSTALLING).contains(state))
      throw new SubsystemException("Cannot stop from state " + state);
    // The following states must wait.
    if (EnumSet.of(State.INSTALLING, State.RESOLVING, State.STARTING, State.STOPPING).contains(state)) {
View Full Code Here


 
  @Override
  public Object run() {
    checkValid();
    checkRoot();
    State state = target.getState();
    if (EnumSet.of(State.UNINSTALLED).contains(state))
      return null;
    else if (EnumSet.of(State.INSTALL_FAILED, State.INSTALLING, State.RESOLVING, State.STARTING, State.STOPPING, State.UNINSTALLING).contains(state)) {
      waitForStateChange();
      target.uninstall();
    }
    else if (state.equals(State.ACTIVE)) {
      new StopAction(requestor, target, disableRootCheck).run();
      target.uninstall();
    }
    else
      ResourceUninstaller.newInstance(requestor, target).uninstall();
View Full Code Here

  }
 
  @Override
  public Object run() {
    checkRoot();
    State state = target.getState();
    if (EnumSet.of(State.INSTALLED, State.RESOLVED).contains(state))
      return null;
    else if (EnumSet.of(State.INSTALL_FAILED, State.UNINSTALLING, State.UNINSTALLED).contains(state))
      throw new IllegalStateException("Cannot stop from state " + state);
    else if (EnumSet.of(State.INSTALLING, State.RESOLVING, State.STARTING, State.STOPPING).contains(state)) {
View Full Code Here

TOP

Related Classes of org.osgi.service.subsystem.Subsystem.State

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.