/** * Push context to MDR. * * @param context The ServiceControllerContext we are installing */ public void installAction(ServiceControllerContext context) throws Throwable { KernelMetaDataRepository repository = getRepository(context); repository.addMetaData(context); }
/** * Get the instance * * @return the actions */ public static ServiceControllerContextActions getInstance() { if (instance == null) { Map<ControllerState, ControllerContextAction> actions = new HashMap<ControllerState, ControllerContextAction>(); actions.put(ControllerState.DESCRIBED, new DescribeAction()); actions.put(ControllerState.INSTANTIATED, new InstantiateAction()); actions.put(ControllerState.CONFIGURED, new ConfigureAction()); actions.put(ControllerState.CREATE, new CreateDestroyLifecycleAction()); actions.put(ControllerState.START, new StartStopLifecycleAction()); actions.put(ControllerState.INSTALLED, new InstallAction()); instance = new ServiceControllerContextActions(actions); } return instance; }
/** * Get the instance * * @return the actions */ public static ServiceControllerContextActions getInstance() { if (instance == null) { Map<ControllerState, ControllerContextAction> actions = new HashMap<ControllerState, ControllerContextAction>(); actions.put(ControllerState.DESCRIBED, new DescribeAction()); actions.put(ControllerState.INSTANTIATED, new InstantiateAction()); actions.put(ControllerState.CONFIGURED, new ConfigureAction()); actions.put(ControllerState.CREATE, new CreateDestroyLifecycleAction()); actions.put(ControllerState.START, new StartStopLifecycleAction()); actions.put(ControllerState.INSTALLED, new InstallAction()); instance = new ServiceControllerContextActions(actions); } return instance; }
/** * Remove context form MDR. * * @param context The ServiceControllerContext we are uninstalling */ public void uninstallAction(ServiceControllerContext context) { KernelMetaDataRepository repository = getRepository(context); repository.removeMetaData(context); } }