Package org.osgi.service.coordinator

Examples of org.osgi.service.coordinator.Participant


                this.participants.clear();
            }
            // consider failure reason (if not null)
            for (int i=releaseList.size()-1;i>=0;i--)
            {
                final Participant part = releaseList.get(i);
                try
                {
                    part.failed(this);
                }
                catch (final Exception e)
                {
                    LogWrapper.getLogger()
                        .log(LogWrapper.LOG_ERROR, "Participant threw exception during call to fail()", e);
View Full Code Here


                this.participants.clear();
            }
            // consider failure reason (if not null)
            for (int i=releaseList.size()-1;i>=0;i--)
            {
                final Participant part = releaseList.get(i);
                try
                {
                    if ( this.failReason != null )
                    {
                        part.failed(this);
                    }
                    else
                    {
                        part.ended(this);
                    }
                }
                catch (final Exception e)
                {
                    LogWrapper.getLogger()
View Full Code Here

    this.resource = resource;
    final File file = new File(Activator.getInstance().getBundleContext().getDataFile(""), Long.toString(resource.getId()));
    file.mkdirs();
    Coordination coordination = Activator.getInstance().getCoordinator().peek();
    if (coordination != null) {
      coordination.addParticipant(new Participant() {
        @Override
        public void ended(Coordination c) throws Exception {
          // Nothing
        }
View Full Code Here

      return;
    // Don't let a resource become a child of itself.
    if (resource.equals(provisionTo))
      return;
    Activator.getInstance().getSubsystems().addChild(provisionTo, child, !isDependency());
    coordination.addParticipant(new Participant() {
      @Override
      public void ended(Coordination arg0) throws Exception {
        // Nothing
      }
View Full Code Here

    });
  }
 
  private void addSubsystem(final BasicSubsystem subsystem) {
    Activator.getInstance().getSubsystems().addSubsystem(subsystem);
    coordination.addParticipant(new Participant() {
      @Override
      public void ended(Coordination arg0) throws Exception {
        // Nothing
      }
 
View Full Code Here

 
  private void installRegionContextBundle(final BasicSubsystem subsystem) throws BundleException, IOException {
    if (!subsystem.isScoped())
      return;
    RegionContextBundleHelper.installRegionContextBundle(subsystem);
    coordination.addParticipant(new Participant() {
      @Override
      public void ended(Coordination coordination) throws Exception {
        // Nothing
      }
View Full Code Here

    if ((bundle.getState() & (Bundle.STARTING | Bundle.ACTIVE)) != 0)
      return;
    bundle.start(Bundle.START_TRANSIENT | Bundle.START_ACTIVATION_POLICY);
    if (coordination == null)
      return;
    coordination.addParticipant(new Participant() {
      public void ended(Coordination coordination) throws Exception {
        // noop
      }
 
      public void failed(Coordination coordination) throws Exception {
View Full Code Here

    if (Utils.isContent(this.target, subsystem))
      subsystem.setAutostart(true);
    new StartAction(instigator, target, subsystem).run();
    if (coordination == null)
      return;
    coordination.addParticipant(new Participant() {
      public void ended(Coordination coordination) throws Exception {
        // noop
      }
 
      public void failed(Coordination coordination) throws Exception {
View Full Code Here

 
  public synchronized Region getRegion() throws BundleException, IOException, InvalidSyntaxException, URISyntaxException {
    if (region == null) {
      region = createRegion(getId());
      Coordination coordination = Activator.getInstance().getCoordinator().peek();
      coordination.addParticipant(new Participant() {
        @Override
        public void ended(Coordination arg0) throws Exception {
          // Nothing.
        }
View Full Code Here

      // which closes the input stream, an exception may occur before this
      // happens. Also, the Region API does not guarantee the stream will
      // be closed.
      IOUtils.close(is);
    }
    coordination.addParticipant(new Participant() {
      public void ended(Coordination coordination) throws Exception {
        // Nothing
      }

      public void failed(Coordination coordination) throws Exception {
View Full Code Here

TOP

Related Classes of org.osgi.service.coordinator.Participant

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.