org.ow2.petals.jmx
Class InstallationServiceClient

java.lang.Object
  extended by org.ow2.petals.jmx.AbstractServiceClient
      extended by org.ow2.petals.jmx.InstallationServiceClient

public final class InstallationServiceClient
extends AbstractServiceClient

Client API of the JMX installation service.

Author:
cdeneux - Capgemini Sud

Field Summary
 
Fields inherited from class org.ow2.petals.jmx.AbstractServiceClient
JMX_FIELD_NAME, JMX_FIELD_TYPE, JMX_SERVICE_TYPE, mbeanName, mBeanServerConnection, petalsDomain
 
Constructor Summary
InstallationServiceClient(java.lang.String petalsDomain, javax.management.MBeanServerConnection mBeanServerConnection)
          Creates a new instance of InstallationServiceClient
 
Method Summary
 boolean forceUnloadInstaller(java.lang.String componentName)
          Force unload of installer.
 java.lang.String[] getInstalledComponentsForSharedlibrary(java.lang.String sharedLibraryName)
          Get the components that use a shared library.
 java.lang.String[] getInstalledSharedLibraries()
          Get all installed shared libraries.
 java.lang.String[] getInstallers()
          Get all existing installers.
 java.lang.String installSharedLibrary(java.net.URL sharedLibraryURL)
          Install a shared-library.
 InstallerComponentClient loadInstaller(java.lang.String componentName)
          Load an installer.
 InstallerComponentClient loadNewInstaller(java.net.URL packageURL)
          Load a new installer.
 java.lang.String[] shutdownAllComponents()
          Shutdown all the component.
 boolean shutdownComponent(java.lang.String componentName)
          Shutdown the component.
 java.lang.String[] startAllComponents()
          Start all the component.
 boolean startComponent(java.lang.String componentName)
          Start the component.
 java.lang.String[] stopAllComponents()
          Stop all the component.
 boolean stopComponent(java.lang.String componentName)
          Stop the component.
 java.lang.String[] uninstallAllComponents()
          Uninstall all the component.
 java.lang.String[] uninstallAllSharedLibrary()
          Uninstall all shared-library.
 boolean uninstallSharedLibrary(java.lang.String sharedLibraryName)
          Uninstall a Shared Library.
 java.lang.String[] unloadAllInstallers(boolean force)
          Unload all the component installers.
 boolean unloadInstaller(java.lang.String componentName)
          Unload a component installer.
 
Methods inherited from class org.ow2.petals.jmx.AbstractServiceClient
getAttribute, getAttribute, performAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstallationServiceClient

public InstallationServiceClient(java.lang.String petalsDomain,
                                 javax.management.MBeanServerConnection mBeanServerConnection)
                          throws InstallationServiceDoesNotExistException,
                                 InstallationServiceErrorException
Creates a new instance of InstallationServiceClient

Parameters:
petalsDomain -
mBeanServerConnection -
Throws:
InstallationServiceDoesNotExistException
InstallationServiceErrorException
Method Detail

forceUnloadInstaller

public boolean forceUnloadInstaller(java.lang.String componentName)
                             throws InstallationServiceErrorException
Force unload of installer. This method forces the installation of the related component, and then forces the unload of its installer.

Parameters:
componentName -
Throws:
InstallationServiceErrorException
See Also:
InstallationServiceMBean#forceUnloadInstaller(String)

getInstalledComponentsForSharedlibrary

public java.lang.String[] getInstalledComponentsForSharedlibrary(java.lang.String sharedLibraryName)
                                                          throws InstallationServiceErrorException
Get the components that use a shared library. This API is not defined by JBI.

Returns:
All component identifiers using the provided shared-library.
Throws:
PerformActionErrorException
InstallationServiceErrorException

getInstalledSharedLibraries

public java.lang.String[] getInstalledSharedLibraries()
                                               throws InstallationServiceErrorException
Get all installed shared libraries. This API is not defined by JBI.

Returns:
All installed shared libraries.
Throws:
InstallationServiceErrorException

getInstallers

public java.lang.String[] getInstallers()
                                 throws InstallationServiceErrorException
Get all existing installers. This API is not defined by JBI.

Returns:
All installed shared libraries.
Throws:
InstallationServiceErrorException

installSharedLibrary

public java.lang.String installSharedLibrary(java.net.URL sharedLibraryURL)
                                      throws InstallationServiceErrorException
Install a shared-library.

Returns:
The unique name of the shared library installed.
Throws:
InstallationServiceErrorException
See Also:
InstallationServiceMBean.installSharedLibrary(String)

loadInstaller

public InstallerComponentClient loadInstaller(java.lang.String componentName)
                                       throws InstallerComponentDoesNotExistException,
                                              InstallationServiceErrorException
Load an installer.

Parameters:
packageURL -
Returns:
The component installer if it exists.
Throws:
InstallerComponentDoesNotExistException - No component installer identified by componentName was loaded.
InstallationServiceErrorException
See Also:
InstallationServiceMBean.loadInstaller(String)

loadNewInstaller

public InstallerComponentClient loadNewInstaller(java.net.URL packageURL)
                                          throws InstallationServiceErrorException
Load a new installer.

Parameters:
packageURL -
Throws:
InstallationServiceErrorException
See Also:
InstallationServiceMBean.loadNewInstaller(String)

shutdownAllComponents

public java.lang.String[] shutdownAllComponents()
                                         throws InstallationServiceErrorException
Shutdown all the component.

Returns:
the list of component names that has been shut down
Throws:
InstallationServiceErrorException

shutdownComponent

public boolean shutdownComponent(java.lang.String componentName)
                          throws InstallationServiceErrorException
Shutdown the component.

Parameters:
componentName -
Returns:
true if the shut down was successful.
Throws:
InstallationServiceErrorException

startAllComponents

public java.lang.String[] startAllComponents()
                                      throws InstallationServiceErrorException
Start all the component.

Returns:
the list of component names that has been started
Throws:
InstallationServiceErrorException

startComponent

public boolean startComponent(java.lang.String componentName)
                       throws InstallationServiceErrorException
Start the component.

Parameters:
componentName -
Returns:
true if the start was successful.
Throws:
InstallationServiceErrorException

stopAllComponents

public java.lang.String[] stopAllComponents()
                                     throws InstallationServiceErrorException
Stop all the component.

Returns:
the list of component names that has been stopped
Throws:
InstallationServiceErrorException

stopComponent

public boolean stopComponent(java.lang.String componentName)
                      throws InstallationServiceErrorException
Stop the component.

Parameters:
componentName -
Returns:
true if the stop was successful.
Throws:
InstallationServiceErrorException

uninstallAllComponents

public java.lang.String[] uninstallAllComponents()
                                          throws InstallationServiceErrorException
Uninstall all the component.

Returns:
the list of component names that has been uninstalled
Throws:
InstallationServiceErrorException

uninstallAllSharedLibrary

public java.lang.String[] uninstallAllSharedLibrary()
                                             throws InstallationServiceErrorException
Uninstall all shared-library.

Returns:
the list of the Shared Libraries names that has been uninstalled
Throws:
InstallationServiceErrorException

uninstallSharedLibrary

public boolean uninstallSharedLibrary(java.lang.String sharedLibraryName)
                               throws InstallationServiceErrorException
Uninstall a Shared Library.

Returns:
true if the uninstall was successful.
Throws:
InstallationServiceErrorException
See Also:
InstallationServiceMBean.uninstallSharedLibrary(String)

unloadAllInstallers

public java.lang.String[] unloadAllInstallers(boolean force)
                                       throws InstallationServiceErrorException
Unload all the component installers.

Returns:
the list of component names whose installers has been unloaded.
Throws:
InstallationServiceErrorException

unloadInstaller

public boolean unloadInstaller(java.lang.String componentName)
                        throws InstallationServiceErrorException
Unload a component installer. The component is deleted as well.

Parameters:
componentName -
Throws:
InstallationServiceErrorException
See Also:
InstallationServiceMBean.unloadInstaller(String, boolean)


Copyright © 2005-2011 Petals Link (EBM Websourcing). All Rights Reserved.