Examples of URLObjectFactoryFinder


Examples of org.apache.aries.jndi.urls.URLObjectFactoryFinder

      if (ref == null) {
        ServiceReference[] refs = Activator.getURLObectFactoryFinderServices();
       
        if (refs != null) {
          for (ServiceReference finderRef : refs) {
            URLObjectFactoryFinder finder = (URLObjectFactoryFinder) ctx.getService(finderRef);
            if (finder != null) {
              ObjectFactory f = finder.findFactory(urlScheme, environment);
             
              if (f != null) {
                result = new ServicePair<ObjectFactory>(ctx, finderRef, f);
                break;
              } else {
View Full Code Here

Examples of org.apache.aries.jndi.urls.URLObjectFactoryFinder

            }
        });       
       
        if (refs != null) {
          for (final ServiceReference finderRef : refs) {
            URLObjectFactoryFinder finder = (URLObjectFactoryFinder) Utils.getServicePrivileged(ctx, finderRef);
               
            if (finder != null) {
              ObjectFactory f = finder.findFactory(urlScheme, environment);
             
              if (f != null) {
                result = new ServicePair<ObjectFactory>(ctx, finderRef, f);
                break;
              } else {
View Full Code Here

Examples of org.apache.aries.jndi.urls.URLObjectFactoryFinder

  @Test
  public void testURLReferenceUsingURLObjectFactoryFinder() throws Exception
  {
    String testObject = "Test object";
    URLObjectFactoryFinder factory = Skeleton.newMock(URLObjectFactoryFinder.class);
    Skeleton.getSkeleton(factory).setReturnValue(new MethodCall(ObjectFactory.class, "getObjectInstance", Object.class, Name.class, Context.class, Hashtable.class), testObject);

    bc.registerService(URLObjectFactoryFinder.class.getName(), factory, new Properties());

    Reference ref = new Reference(null);
View Full Code Here

Examples of org.apache.aries.jndi.urls.URLObjectFactoryFinder

          }
    });       
       
        if (refs != null) {
          for (final ServiceReference finderRef : refs) {
            URLObjectFactoryFinder finder = (URLObjectFactoryFinder) Utils.getServicePrivileged(ctx, finderRef);
             
            if (finder != null) {
              ObjectFactory f = finder.findFactory(urlScheme, environment);
             
              if (f != null) {
                result = new ServicePair<ObjectFactory>(ctx, finderRef, f);
                break;
              } else {
View Full Code Here

Examples of org.apache.aries.jndi.urls.URLObjectFactoryFinder

  @Test
  public void testURLReferenceUsingURLObjectFactoryFinder() throws Exception
  {
    String testObject = "Test object";
    URLObjectFactoryFinder factory = Skeleton.newMock(URLObjectFactoryFinder.class);
    Skeleton.getSkeleton(factory).setReturnValue(new MethodCall(ObjectFactory.class, "getObjectInstance", Object.class, Name.class, Context.class, Hashtable.class), testObject);

    bc.registerService(URLObjectFactoryFinder.class.getName(), factory, new Properties());

    Reference ref = new Reference(null);
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.