Package org.springframework.osgi.service.importer

Examples of org.springframework.osgi.service.importer.ServiceReferenceProxy


    ServiceReference ref = new MockServiceReference(classInterfaces);
    services.put(ref, date);

    Object proxy = proxyCreator.createServiceProxy(ref).proxy;
    assertTrue(proxy instanceof ImportedOsgiServiceProxy);
    ServiceReferenceProxy referenceProxy = ((ImportedOsgiServiceProxy) proxy).getServiceReference();
    assertNotNull(referenceProxy);
    assertSame(ref, referenceProxy.getTargetServiceReference());
  }
View Full Code Here


    services.put(ref, date);

    Object proxy = proxyCreator.createServiceProxy(ref).proxy;
    Object proxy2 = proxyCreator.createServiceProxy(ref).proxy;

    ServiceReferenceProxy referenceProxy = ((ImportedOsgiServiceProxy) proxy).getServiceReference();
    assertSame(ref, referenceProxy.getTargetServiceReference());
    ServiceReferenceProxy referenceProxy2 = ((ImportedOsgiServiceProxy) proxy2).getServiceReference();
    assertSame(ref, referenceProxy2.getTargetServiceReference());
    assertEquals(referenceProxy, referenceProxy2);
    assertFalse(referenceProxy == referenceProxy2);
  }
View Full Code Here

TOP

Related Classes of org.springframework.osgi.service.importer.ServiceReferenceProxy

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.