- c.add(createContainerServiceDependency(containerName).setService(
- ISwitchManager.class).setCallbacks("setSwitchManager",
- "unsetSwitchManager").setRequired(false));
- c.add(createContainerServiceDependency(containerName).setService(
- IClusterContainerServices.class).setCallbacks(
- "setClusterContainerService",
- "unsetClusterContainerService").setRequired(true));
- c.add(createContainerServiceDependency(containerName).setService(
- IHostFinder.class).setCallbacks("setArpHandler",
- "unsetArpHandler").setRequired(false));
- c.add(createContainerServiceDependency(containerName).setService(
- ITopologyManager.class).setCallbacks("setTopologyManager",
- "unsetTopologyManager").setRequired(false));
- c.add(createContainerServiceDependency(containerName).setService(
- IfNewHostNotify.class).setCallbacks("setnewHostNotify",
- "unsetnewHostNotify").setRequired(false));
- }
- }
-
- /**
- * Method which tells how many Global implementations are
- * supported by the bundle. This way we can tune the number of
- * components created. This components will be created ONLY at the
- * time of bundle startup and will be destroyed only at time of
- * bundle destruction, this is the major difference with the
- * implementation retrieved via getImplementations where all of
- * them are assumed to be in a container !
- *
- *
- * @return The list of implementations the bundle will support,
- * in Global version
- */
- protected Object[] getGlobalImplementations() {
- return null;
- }
+ // export the service
+ c.setInterface(
+ new String[] { ISwitchManagerAware.class.getName(),
+ IInventoryListener.class.getName(),
+ IfIptoHost.class.getName(),
+ IfHostListener.class.getName(),
+ ITopologyManagerAware.class.getName(),
+ ICacheUpdateAware.class.getName() }, props);