org.ow2.petals.microkernel.api.jbi.management
Interface InstallationServiceMBean

All Superinterfaces:
javax.jbi.management.InstallationServiceMBean
All Known Subinterfaces:
InstallationService

public interface InstallationServiceMBean
extends javax.jbi.management.InstallationServiceMBean

This custom interface add methods used by reinstallation tasks of the SystemStateService service.

Author:
Adrien Louis - EBM WebSourcing, Rafael Marins - Fossil E-Commerce

Method Summary
 boolean forceUnloadInstaller(String compName)
          Try to unload installer of a component.
 String[] getInstalledComponentsForSharedLibrary(String slName)
          Get the list of components that use the shared library
 String[] getInstalledSharedLibraries()
          Get the list of all installed shared libraries
 String[] getInstallers()
          Get the list of all the existing installers
 String[] shutdownAllComponents()
          Try to shutdown all components.
 String[] shutdownAllNoMoreUsedComponents()
          Try to shutdown all no more used components (no service assembly is deployed having a service unit running on the component).
 boolean shutdownComponent(String componentName)
          Shutdown the component.
 String[] startAllComponents()
          Try to start all components.
 boolean startComponent(String componentName)
          Start the component.
 String[] stopAllComponents()
          Try to stop all components.
 boolean stopComponent(String componentName)
          Stop the component.
 String[] uninstallAllComponents()
          Try to uninstall all components.
 String[] uninstallAllNoMoreUsedComponents()
          Try to uninstall all no more used components (no service assembly is deployed having a service unit running on the component).
 String[] uninstallAllNoMoreUsedSharedLibraries()
          Try to uninstall all no more used shared libraries (no component is installed referencing the shared library).
 String[] uninstallAllSharedLibraries()
          Try to uninstall all shared libraries.
 boolean uninstallComponent(String componentName)
          Uninstall the component.
 boolean uninstallSharedLibrary(String slName, String version)
          Uninstall a previously installed shared library with the given version.
 String[] unloadAllInstallers(boolean force)
          Try to uninstall all components.
 
Methods inherited from interface javax.jbi.management.InstallationServiceMBean
installSharedLibrary, loadInstaller, loadNewInstaller, uninstallSharedLibrary, unloadInstaller
 

Method Detail

uninstallSharedLibrary

boolean uninstallSharedLibrary(String slName,
                               String version)
Uninstall a previously installed shared library with the given version.

Parameters:
slName - the name of the shared name space to uninstall; must be non-null and non-empty
version - the Version of the shared name space to uninstall; must be non-null and non-empty
Returns:
true if the uninstall was successful

forceUnloadInstaller

boolean forceUnloadInstaller(String compName)
Try to unload installer of a component. If the component is in the STARTED state it's stopped and shutdown, if the component is in the STOPPED state it's shutdown. If the installer is in the INSTALLED state, it's uninstalled.

Parameters:
compName - the component unique name
Returns:
true if the component installer is correctly unloaded, false otherwise

getInstalledComponentsForSharedLibrary

String[] getInstalledComponentsForSharedLibrary(String slName)
                                                throws Exception
Get the list of components that use the shared library

Parameters:
slName - the name of the shared library
Returns:
the list of components that uses this shared library
Throws:
Exception - if the shared library is not installed

getInstalledSharedLibraries

String[] getInstalledSharedLibraries()
Get the list of all installed shared libraries

Returns:
the list of all installed shared libraries

getInstallers

String[] getInstallers()
Get the list of all the existing installers

Returns:
the list of all the existing installers

shutdownAllComponents

String[] shutdownAllComponents()
Try to shutdown all components. If a component can't be shutdown, the shutdowning process isn't aborted. It returns the list of all shutdown components.

Returns:
an array of succesfuly shutdown component names.

shutdownAllNoMoreUsedComponents

String[] shutdownAllNoMoreUsedComponents()
Try to shutdown all no more used components (no service assembly is deployed having a service unit running on the component). If a component can't be shutdown, the shutdowning process isn't aborted. It returns the list of all shutdown components.

Returns:
an array of succesfuly shutdown component names.

shutdownComponent

boolean shutdownComponent(String componentName)
                          throws javax.jbi.JBIException
Shutdown the component. This puts the component into the AbstractLifeCycle#SHUTDOWN state.

Parameters:
componentName - name of the component to be shutdown; must be non-null and non-empty
Returns:
true if the component is correctly shut down
Throws:
javax.jbi.JBIException - if the component fails to shut down

startAllComponents

String[] startAllComponents()
Try to start all components. If a component can't be started, the starting process isn't aborted. It returns the list of all started components.

Returns:
an array of succesfuly started component names.

startComponent

boolean startComponent(String componentName)
                       throws javax.jbi.JBIException
Start the component. This puts the component into the AbstractLifeCycle#STARTED state.

Parameters:
componentName - name of the component to be started; must be non-null and non-empty
Returns:
true if the component is correctly started
Throws:
javax.jbi.JBIException - if the component fails to start

stopAllComponents

String[] stopAllComponents()
Try to stop all components. If a component can't be stoped, the stoping process isn't aborted. It returns the list of all stoped components.

Returns:
an array of succesfuly stoped component names.

stopComponent

boolean stopComponent(String componentName)
                      throws javax.jbi.JBIException
Stop the component. This puts the component into the AbstractLifeCycle#STOPPED state.

Parameters:
componentName - name of the component to be stopped; must be non-null and non-empty
Returns:
true if the component is correctly stopped
Throws:
javax.jbi.JBIException - if the component fails to stop

uninstallAllComponents

String[] uninstallAllComponents()
Try to uninstall all components. If a component can't be uninstalled, the uninstalling process isn't aborted. It returns the list of all uninstalled components.

Returns:
an array of succesfuly uninstalled component names.

uninstallAllNoMoreUsedComponents

String[] uninstallAllNoMoreUsedComponents()
Try to uninstall all no more used components (no service assembly is deployed having a service unit running on the component). If a component can't be uninstalled, the uninstalling process isn't aborted. It returns the list of all uninstalled components.

Returns:
an array of succesfuly uninstalled component names.

uninstallAllSharedLibraries

String[] uninstallAllSharedLibraries()
Try to uninstall all shared libraries. If a shared library can't be uninstalled, the uninstalling process isn't aborted. It returns the list of all uninstalled shared libraries.

Returns:
an array of succesfuly uninstalled shared library names.

uninstallAllNoMoreUsedSharedLibraries

String[] uninstallAllNoMoreUsedSharedLibraries()
Try to uninstall all no more used shared libraries (no component is installed referencing the shared library). If a shared library can't be uninstalled, the uninstalling process isn't aborted. It returns the list of all uninstalled shared libraries.

Returns:
an array of succesfuly uninstalled shared library names.

uninstallComponent

boolean uninstallComponent(String componentName)
                           throws javax.jbi.JBIException
Uninstall the component. This puts the component into the Installer.UNINSTALLED state.

Parameters:
componentName - name of the component to be uninstalled; must be non-null and non-empty
Returns:
true if the component is correctly uninstalled
Throws:
javax.jbi.JBIException - if the component fails to uninstall

unloadAllInstallers

String[] unloadAllInstallers(boolean force)
Try to uninstall all components. If the boolean is set to true, the uninstallation process is forced as this : if the component is in the STARTED state it's stopped and shutdown, if the component is in the STOPPED state it's shutdown. If the installer is in the INSTALLED state, it's uninstalled. If a component can't be uninstalled, the uninstalling process isn't aborted. It returns the list of all uninstalled components.

Returns:
an array of succesfuly uninstalled component names.


Copyright © 2005-2015 Linagora. All Rights Reserved.