Package org.springframework.osgi.iandt.simpleservice

Examples of org.springframework.osgi.iandt.simpleservice.MyService.stringValue()


    assertNotNull(service1);
    assertNotNull(service2);

    String msg1 = service1.stringValue();
    String msg2 = service2.stringValue();

    String jmsg = "Bond.  James Bond.";
    String cmsg = "Connery.  Sean Connery #1";
    System.out.println(msg1);
    System.out.println(msg2);
View Full Code Here


  public void testReferenceProxyLifecycle() throws Exception {

    MyService reference = ServiceReferer.serviceReference;

    assertNotNull("reference not initialized", reference);
    assertNotNull("no value specified in the reference", reference.stringValue());

    Bundle simpleServiceBundle = OsgiBundleUtils.findBundleBySymbolicName(bundleContext,
      "org.springframework.osgi.iandt.simpleservice");

    assertNotNull("Cannot find the simple service bundle", simpleServiceBundle);
View Full Code Here

    }
    System.out.println("bundle stopped");

    // Service should be unavailable
    try {
      reference.stringValue();
      fail("ServiceUnavailableException should have been thrown!");
    }
    catch (ServiceUnavailableException e) {
      // Expected
    }
View Full Code Here

    waitOnContextCreation("org.springframework.osgi.iandt.simpleservice");

    System.out.println("bundle started");
    // Service should be running
    assertNotNull(reference.stringValue());
  }

  protected long getDefaultWaitTime() {
    return 15L;
  }
View Full Code Here

  public void testReferenceProxyLifecycle() throws Exception {

    MyService reference = ServiceReferer.serviceReference;

    assertNotNull("reference not initialized", reference);
    assertNotNull("no value specified in the reference", reference.stringValue());

    Bundle simpleServiceBundle = OsgiBundleUtils.findBundleBySymbolicName(bundleContext,
      "org.springframework.osgi.iandt.simpleservice");

    assertNotNull("Cannot find the simple service bundle", simpleServiceBundle);
View Full Code Here

    }
    System.out.println("bundle stopped");

    // Service should be unavailable
    try {
      reference.stringValue();
      fail("ServiceUnavailableException should have been thrown!");
    }
    catch (ServiceUnavailableException e) {
      // Expected
    }
View Full Code Here

    waitOnContextCreation("org.springframework.osgi.iandt.simpleservice");

    System.out.println("bundle started");
    // Service should be running
    assertNotNull(reference.stringValue());
  }

  protected long getDefaultWaitTime() {
    return 15L;
  }
View Full Code Here

  public void testProxyDestruction() throws Exception {

    MyService reference = ServiceReferer.serviceReference;

    assertNotNull("reference not initialized", reference);
    assertNotNull("no value specified in the reference", reference.stringValue());

    Bundle simpleServiceBundle = OsgiBundleUtils.findBundleBySymbolicName(bundleContext,
      "org.springframework.osgi.iandt.simpleservice");

    assertNotNull("Cannot find the simple service bundle", simpleServiceBundle);
View Full Code Here

    t.start();

    // Service should be unavailable
    try {
      System.out.println("Invoking method on OSGi service proxy...");
      reference.stringValue();
      fail("ServiceProxyDestroyedException should have been thrown!");
    }
    catch (ServiceProxyDestroyedException e) {
      // Expected
    }
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.