Package org.osgi.framework

Examples of org.osgi.framework.BundleContext.ungetService()


   */
  public static boolean getTargetBC_ungetService(final ServiceReference sr)
  {
    final BundleContext tbc = getTargetBC();
    if(null != tbc) {
      return tbc.ungetService(sr);
    }
    return false;
  }

  /**
 
View Full Code Here


                try {
                    if (target instanceof Function) {
                        function = (Function) target;
                    }
                } finally {
                    context.ungetService(reference);
                }
            }
        } catch (Throwable t) {
        }
        return function;
View Full Code Here

            if (coordination != null)
                coordination.fail(e);
        } finally {
            if (coordinator != null)
                bc.ungetService(coordSvcRef);
        }
    }

    public ResolutionResult getResult() {
        return result;
View Full Code Here

                try {
                    base.evaluate();
                } finally {
                    Service.this.service = null;
                    bundleContext.ungetService(serviceReference);
                }
            }

        };
    }
View Full Code Here

                            // unget the repository if the service cannot
                            // login to it, otherwise the repository service
                            // is let go off when the resource resolver is
                            // closed and the session logged out
                            if (session == null) {
                                bc.ungetService(repositoryReference);
                            }
                        }

                    } else {
View Full Code Here

            if (coordination != null)
                coordination.fail(e);
        } finally {
            if (coordinator != null)
                bc.ungetService(coordSvcRef);
        }
    }

    public ResolutionResult getResult() {
        return result;
View Full Code Here

            try {
                installer.registerResources(prefix, toRegister.toArray(new InstallableResource[] {}));
                log.info("Registered {} resources with installer, using prefix '{}'", toRegister.size(), prefix);
                resources.clear();
            } finally {
                ctx.ungetService(ref);
            }
        }
       
    }
}
View Full Code Here

      if (root == null)
        return null;
      // strip off file: prefix from URL
      return new Path(root.toExternalForm().substring(5));
    } finally {
      context.ungetService(ref);
    }
  }

  /**
   * Returns the root location for storing content and metadata on this
View Full Code Here

                    }
                    finally
                    {
                        try
                        {
                            bundleContext.ungetService( caRef );
                        }
                        catch ( IllegalStateException e )
                        {
                            // ignore, bundle context was shut down during the above.
                        }
View Full Code Here

                        throw new ConfigurationException( OsgiManager.PROP_PASSWORD, "Cannot update password property",
                            e );
                    }
                    finally
                    {
                        bc.ungetService( ref );
                    }
                }
            }
        }
    }
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.