Package org.jboss.as.test.smoke.osgi.bundle

Examples of org.jboss.as.test.smoke.osgi.bundle.SimpleService


        BundleContext context = bundle.getBundleContext();
        ServiceReference sref = context.getServiceReference(SimpleService.class.getName());
        assertNotNull("ServiceReference not null", sref);

        // Get the service for the reference
        SimpleService service = (SimpleService) context.getService(sref);
        assertNotNull("Service not null", service);

        // Invoke the service
        int sum = service.sum(1, 2, 3);
        assertEquals(6, sum);

        // Stop the bundle
        bundle.stop();
        Assert.assertEquals(Bundle.RESOLVED, bundle.getState());
View Full Code Here

TOP

Related Classes of org.jboss.as.test.smoke.osgi.bundle.SimpleService

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.