1 package org
.argeo
.slc
.jemmytest
;
3 import java
.util
.Properties
;
5 import org
.argeo
.slc
.autoui
.AutoUiApplication
;
6 import org
.osgi
.framework
.BundleActivator
;
7 import org
.osgi
.framework
.BundleContext
;
8 import org
.osgi
.framework
.ServiceEvent
;
9 import org
.osgi
.framework
.ServiceListener
;
11 public class JemmyTestActivator
implements BundleActivator
, ServiceListener
{
13 public void start(BundleContext context
) throws Exception
{
14 stdOut("JemmyTest started");
15 Properties properties
= new Properties();
16 AutoUiApplicationJemmy applicationJemmy
= new AutoUiApplicationJemmy();
17 context
.registerService(AutoUiApplication
.class.getName(),
18 applicationJemmy
, properties
);
19 context
.registerService(Runnable
.class.getName(), applicationJemmy
,
22 // ServiceReference ref = context
23 // .getServiceReference("org.argeo.slc.autoui.AutoUiApplication");
24 // Object service = context.getService(ref);
25 // // JemmyTestActivator.stdOut("service=" + service.getClass());
26 // AutoUiApplication app = (AutoUiApplication) service;
31 public void stop(BundleContext context
) throws Exception
{
32 stdOut("JemmyTest stopped");
35 public void serviceChanged(ServiceEvent serviceEvent
) {
36 stdOut("serviceEvent=" + serviceEvent
);
40 public static void stdOut(Object obj
) {
41 System
.out
.println(obj
);