Package org.osgi.framework.hooks.resolver

Examples of org.osgi.framework.hooks.resolver.ResolverHookFactory


    ServiceReferenceImpl<ResolverHookFactory>[] refs = getHookReferences();
    @SuppressWarnings("unchecked")
    List<HookReference> hookRefs = refs == null ? Collections.EMPTY_LIST : new ArrayList<CoreResolverHookFactory.HookReference>(refs.length);
    if (refs != null)
      for (ServiceReferenceImpl<ResolverHookFactory> hookRef : refs) {
        ResolverHookFactory factory = context.getService(hookRef);
        if (factory != null) {
          try {
            ResolverHook hook = factory.begin(triggers);
            if (hook != null)
              hookRefs.add(new HookReference(hookRef, hook));
          } catch (Throwable t) {
            handleHookException(t, factory, "begin", hookRef.getBundle(), hookRefs, true); //$NON-NLS-1$
          }
View Full Code Here


            // Create resolver hook objects by calling begin() on factory.
            for (ServiceReference<ResolverHookFactory> ref : hookRefs)
            {
                try
                {
                    ResolverHookFactory rhf = m_felix.getService(m_felix, ref, false);
                    if (rhf != null)
                    {
                        ResolverHook hook =
                            Felix.m_secureAction
                                .invokeResolverHookFactory(rhf, triggers);
View Full Code Here

  }

  private ResolverHook beginHook(State state, Collection<BundleRevision> triggers) {
    if (!(state instanceof StateImpl))
      return null;
    ResolverHookFactory hookFactory = ((StateImpl) state).getResolverHookFactory();
    return hookFactory == null ? null : hookFactory.begin(triggers);
  }
View Full Code Here

            Object key = keys.nextElement();
            tmpPlatformProperties[i].put(key, platformProperties[i].get(key));
          }
        }

        ResolverHookFactory currentFactory = hookFactory;
        if (currentFactory != null) {
          @SuppressWarnings("unchecked")
          Collection<BundleRevision> triggerRevisions = Collections.unmodifiableCollection(triggers == null ? Collections.EMPTY_LIST : Arrays.asList((BundleRevision[]) triggers));
          currentHook = begin(triggerRevisions);
        }
View Full Code Here

      this.hookFactory = hookFactory;
    }
  }

  private ResolverHook begin(Collection<BundleRevision> triggers) {
    ResolverHookFactory current;
    synchronized (this.monitor) {
      current = this.hookFactory;
    }
    ResolverHook newHook = current.begin(triggers);
    synchronized (this.monitor) {
      this.hook = newHook;
    }
    return newHook;
  }
View Full Code Here

    fullyLoad();
    synchronized (this.monitor) {
      ResolverHook currentHook = null;
      try {
        resolving = true;
        ResolverHookFactory currentFactory = hookFactory;
        if (currentFactory != null) {
          Collection<BundleRevision> triggers = new ArrayList<BundleRevision>(1);
          triggers.add(importingBundle);
          triggers = Collections.unmodifiableCollection(triggers);
          currentHook = begin(triggers);
View Full Code Here

            // Create resolver hook objects by calling begin() on factory.
            for (ServiceReference<ResolverHookFactory> ref : hookRefs)
            {
                try
                {
                    ResolverHookFactory rhf = m_felix.getService(m_felix, ref);
                    if (rhf != null)
                    {
                        ResolverHook hook =
                            Felix.m_secureAction
                                .invokeResolverHookFactory(rhf, triggers);
View Full Code Here

            // Create resolver hook objects by calling begin() on factory.
            for (ServiceReference<ResolverHookFactory> ref : hookRefs)
            {
                try
                {
                    ResolverHookFactory rhf = m_felix.getService(m_felix, ref);
                    if (rhf != null)
                    {
                        ResolverHook hook =
                            Felix.m_secureAction
                                .invokeResolverHookFactory(rhf, triggers);
View Full Code Here

TOP

Related Classes of org.osgi.framework.hooks.resolver.ResolverHookFactory

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.