DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
| Code Block |
|---|
public class Activator extends DependencyActivatorBase {
// TODO :)public void init(BundleContext context, DependencyManager manager) throws Exception {
manager.add(createService()
.setInterface(Store.class.getName(), null)
.setImplementation(MemoryStore.class)
);
}
public void destroy(BundleContext context, DependencyManager manager) throws Exception {}
}
public interface Store {
public void put(String key, Object value);
public Object get(String key);
}
public class MemoryStore implements Store {
private Map m_map = new HashMap();
public Object get(String key) {
return m_map.get(key);
}
public void put(String key, Object value) {
m_map.put(key, value);
}
}
|
Depending on a service
Tracking services with callbacks
...