protected static final Logger logger = LoggerFactory
.getLogger(Activator.class);
- /**
- * Function called when the activator starts just after some
- * initializations are done by the
- * ComponentActivatorAbstractBase.
- *
- */
- public void init() {
- }
- /**
- * Function called when the activator stops just before the
- * cleanup done by ComponentActivatorAbstractBase
- *
- */
- public void destroy() {
- }
/**
* Function that is used to communicate to dependency manager the
* instantiated in order to get an fully working implementation
* Object
*/
+ @Override
public Object[] getGlobalImplementations() {
- Object[] res = { ClusterManager.class, ClusterGlobalManager.class };
+ Object[] res = { ClusterManager.class, ClusterGlobalManager.class, ClusterManagerCLI.class };
return res;
}
* instantiated in order to get an fully working implementation
* Object
*/
+ @Override
public Object[] getImplementations() {
Object[] res = { ClusterContainerManager.class };
return res;
* 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(ClusterContainerManager.class)) {
- c.setInterface(new String[] { IClusterContainerServices.class
- .getName() }, null);
+ c.setInterface(new String[] { IClusterContainerServices.class.getName() },
+ null);
- c.add(createServiceDependency().setService(IClusterServices.class)
- .setCallbacks("setClusterService", "unsetClusterService")
- .setRequired(true));
+ c.add(createServiceDependency()
+ .setService(IClusterServices.class)
+ .setCallbacks("setClusterService", "unsetClusterService")
+ .setRequired(true));
// CacheUpdate services will be none or many so the
// dependency is optional
- c.add(createContainerServiceDependency(containerName).setService(
- ICacheUpdateAware.class).setCallbacks(
- "setCacheUpdateAware", "unsetCacheUpdateAware")
- .setRequired(false));
+ c.add(createContainerServiceDependency(containerName)
+ .setService(ICacheUpdateAware.class)
+ .setCallbacks("setCacheUpdateAware", "unsetCacheUpdateAware")
+ .setRequired(false));
// Coordinator change event can be one or many so
// dependency is optional
- c.add(createContainerServiceDependency(containerName).setService(
- ICoordinatorChangeAware.class).setCallbacks(
- "setCoordinatorChangeAware", "unsetCoordinatorChangeAware")
- .setRequired(false));
+ c.add(createContainerServiceDependency(containerName)
+ .setService(ICoordinatorChangeAware.class)
+ .setCallbacks("setCoordinatorChangeAware", "unsetCoordinatorChangeAware")
+ .setRequired(false));
}
}
* needed as long as the same routine can configure multiple
* implementations
*/
+ @Override
public void configureGlobalInstance(Component c, Object imp) {
if (imp.equals(ClusterManager.class)) {
// export the service for Apps and Plugins
- c.setInterface(new String[] { IClusterServices.class.getName() },
- null);
+ c.setInterface(new String[] { IClusterServices.class.getName() }, null);
}
if (imp.equals(ClusterGlobalManager.class)) {
- c.setInterface(new String[] { IClusterGlobalServices.class
- .getName() }, null);
+ c.setInterface(new String[] { IClusterGlobalServices.class.getName() }, null);
- c.add(createServiceDependency().setService(IClusterServices.class)
- .setCallbacks("setClusterService", "unsetClusterService")
- .setRequired(true));
+ c.add(createServiceDependency()
+ .setService(IClusterServices.class)
+ .setCallbacks("setClusterService", "unsetClusterService")
+ .setRequired(true));
// CacheUpdate services will be none or many so the
// dependency is optional
- c.add(createServiceDependency().setService(ICacheUpdateAware.class)
- .setCallbacks("setCacheUpdateAware",
- "unsetCacheUpdateAware").setRequired(false));
+ c.add(createServiceDependency()
+ .setService(ICacheUpdateAware.class)
+ .setCallbacks("setCacheUpdateAware", "unsetCacheUpdateAware")
+ .setRequired(false));
// Coordinator change event can be one or many so
// dependency is optional
- c.add(createServiceDependency().setService(
- ICoordinatorChangeAware.class).setCallbacks(
- "setCoordinatorChangeAware", "unsetCoordinatorChangeAware")
- .setRequired(false));
+ c.add(createServiceDependency()
+ .setService(ICoordinatorChangeAware.class)
+ .setCallbacks("setCoordinatorChangeAware", "unsetCoordinatorChangeAware")
+ .setRequired(false));
}
}
}