- /**
- * Function that is called when configuration of the dependencies
- * is required.
- *
- * @param c dependency manager Component object, used for
- * configuring the dependencies exported and imported
- * @param imp Implementation class that is being configured,
- * needed as long as the same routine can configure multiple
- * implementations
- * @param containerName The containerName being configured, this allow
- * also optional per-container different behavior if needed, usually
- * should not be the case though.
- */
- @Override
- public void configureInstance(Component c, Object imp, String containerName) {
- if (imp.equals(NeutronFloatingIPInterface.class)) {
- // export the service
- c.setInterface(
- new String[] { INeutronFloatingIPCRUD.class.getName(),
- IConfigurationContainerAware.class.getName()}, null);
- Dictionary<String, String> props = new Hashtable<String, String>();
- props.put("salListenerName", "neutron");
- c.add(createContainerServiceDependency(containerName)
- .setService(IClusterContainerServices.class)
- .setCallbacks("setClusterContainerService",
- "unsetClusterContainerService").setRequired(true));
- c.add(createContainerServiceDependency(containerName).setService(
- IConfigurationContainerService.class).setCallbacks(
- "setConfigurationContainerService",
- "unsetConfigurationContainerService").setRequired(true));
+ NeutronFirewallInterface neutronFirewallInterface = new NeutronFirewallInterface();
+ ServiceRegistration<INeutronFirewallCRUD> neutronFirewallInterfaceRegistration = context.registerService(INeutronFirewallCRUD.class, neutronFirewallInterface, null);
+ if(neutronFirewallInterfaceRegistration != null) {
+ registrations.add(neutronFirewallInterfaceRegistration);