javax.slee.management
Interface DeploymentMBean


public interface DeploymentMBean

The DeploymentMBean interface defines deployment-related management operations. Using the DeploymentMBean a management client may install and remove deployment unit jar files in to and out from the SLEE, obtain lists and/or descriptors of the various types of components installed in the SLEE, and generate dependency graphs of the installed components.

The Object Name of a DeploymentMBean object can be obtained by a management client via the SleeManagementMBean.getDeploymentMBean() method.


Method Summary
 DeployableUnitID getDeployableUnit(java.lang.String url)
          Get a deployable unit identifier for a deployable unit jar file that has been installed.
 DeployableUnitID[] getDeployableUnits()
          Get the set of deployable unit identifiers that identify all the deployable units installed in the SLEE.
 ComponentDescriptor getDescriptor(ComponentID id)
          Get the component descriptor for a component identifier.
 DeployableUnitDescriptor getDescriptor(DeployableUnitID id)
          Get the deployable unit descriptor for a deployable unit.
 ComponentDescriptor[] getDescriptors(ComponentID[] ids)
          Get an array of component descriptors corresponding to an array of component identifiers.
 DeployableUnitDescriptor[] getDescriptors(DeployableUnitID[] ids)
          Get an array of deployable unit descriptors corresponding to an array of deployable units.
 EventTypeID[] getEventTypes()
          Get the set of event types installed in the SLEE.
 ProfileSpecificationID[] getProfileSpecifications()
          Get the set of profile specifications installed in the SLEE.
 ComponentID[] getReferringComponents(ComponentID id)
          Get the set of components that use or make reference to a specified component.
 ResourceAdaptorID[] getResourceAdaptors()
          Get the set of resource adaptors installed in the SLEE.
 ResourceAdaptorTypeID[] getResourceAdaptorTypes()
          Get the set of resource adaptor types installed in the SLEE.
 SbbID[] getSbbs()
          Get the set of SBBs installed in the SLEE.
 ServiceID[] getServices()
          Get the set of services installed in the SLEE.
 DeployableUnitID install(java.lang.String url)
          Install a deployable unit jar file into the SLEE.
 boolean isInstalled(ComponentID id)
          Test for the presence of a component.
 boolean isInstalled(DeployableUnitID id)
          Test for the presence of a deployable unit.
 void uninstall(DeployableUnitID id)
          Uninstall a deployable unit jar file out of the SLEE.
 

Method Detail

install

public DeployableUnitID install(java.lang.String url)
                         throws java.lang.NullPointerException,
                                java.net.MalformedURLException,
                                AlreadyDeployedException,
                                DeploymentException,
                                ManagementException
Install a deployable unit jar file into the SLEE. The jar file must contain a deployable unit deployment descriptor at the path location META-INF/deployable-unit.xml.
Parameters:
url - the URL of the jar file to install.
Returns:
a DeployableUnitID that identifies the installed jar file.
Throws:
java.lang.NullPointerException - if url is null.
java.net.MalformedURLException - if url is not a properly formatted URL.
AlreadyDeployedException - if the URL has already been installed, or the jar file contains a component with the same type and identity as a component already installed.
DeploymentException - if the jar file could not be successfully installed due to a problem directly related to it or any of it contained components.
ManagementException - if jar file could not be successfully installed due to a system-level failure.

uninstall

public void uninstall(DeployableUnitID id)
               throws java.lang.NullPointerException,
                      UnrecognizedDeployableUnitException,
                      DependencyException,
                      InvalidStateException,
                      ManagementException
Uninstall a deployable unit jar file out of the SLEE. All the components contained within the deployable unit are also uninstalled. A deployable unit cannot be uninstalled if any other deployable unit installed in the SLEE contains a component that is dependent on one of the components in the deployable unit being uninstalled.
Parameters:
id - the identifer of the deployable unit to uninstall.
Throws:
java.lang.NullPointerException - if id is null.
UnrecognizedDeployableUnitException - if id is not a recognizable DeployableUnitID for the SLEE or it does not correspond with a deployable unit installed in the SLEE.
DependencyException - if another deployable unit installed in the SLEE contains a component that is dependent on the deployable unit being uninstalled.
InvalidStateException - if a component in the deployable unit could not be uninstalled due to being in an invalid state. For example, a service cannot be uninstalled while it is in the ACTIVE state.
ManagementException - if jar file could not be successfully uninstalled due to a system-level failure.

getDeployableUnit

public DeployableUnitID getDeployableUnit(java.lang.String url)
                                   throws java.lang.NullPointerException,
                                          UnrecognizedDeployableUnitException,
                                          ManagementException
Get a deployable unit identifier for a deployable unit jar file that has been installed.
Parameters:
url - the url that the deployable unit jar file was installed from.
Returns:
a DeployableUnitID that identifies the installed jar file.
Throws:
java.lang.NullPointerException - if url is null.
UnrecognizedDeployableUnitException - if url does not correspond with the URL of a deployable unit installed in the SLEE.
ManagementException - if the identifier could not be obtained due to a system-level failure.

getDeployableUnits

public DeployableUnitID[] getDeployableUnits()
                                      throws ManagementException
Get the set of deployable unit identifiers that identify all the deployable units installed in the SLEE.
Returns:
an array of deployable unit identifiers.
Throws:
ManagementException - if the identifiers could not be obtained due to a system-level failure.

getSbbs

public SbbID[] getSbbs()
                throws ManagementException
Get the set of SBBs installed in the SLEE.
Returns:
an array of SBB identifiers.
Throws:
ManagementException - if the identifiers could not be obtained due to a system-level failure.

getEventTypes

public EventTypeID[] getEventTypes()
                            throws ManagementException
Get the set of event types installed in the SLEE.
Returns:
an array of event type identifiers.
Throws:
ManagementException - if the identifiers could not be obtained due to a system-level failure.

getProfileSpecifications

public ProfileSpecificationID[] getProfileSpecifications()
                                                  throws ManagementException
Get the set of profile specifications installed in the SLEE.
Returns:
an array of profile specification identifiers.
Throws:
ManagementException - if the identifiers could not be obtained due to a system-level failure.

getServices

public ServiceID[] getServices()
                        throws ManagementException
Get the set of services installed in the SLEE.
Returns:
an array of Service identifiers.
Throws:
ManagementException - if the identifiers could not be obtained due to a system-level failure.

getResourceAdaptorTypes

public ResourceAdaptorTypeID[] getResourceAdaptorTypes()
                                                throws ManagementException
Get the set of resource adaptor types installed in the SLEE.
Returns:
an array of resource adaptor type identifiers.
Throws:
ManagementException - if the identifiers could not be obtained due to a system-level failure.

getResourceAdaptors

public ResourceAdaptorID[] getResourceAdaptors()
                                        throws ManagementException
Get the set of resource adaptors installed in the SLEE.
Returns:
an array of resource adaptor identifiers.
Throws:
ManagementException - if the identifiers could not be obtained due to a system-level failure.

getReferringComponents

public ComponentID[] getReferringComponents(ComponentID id)
                                     throws java.lang.NullPointerException,
                                            UnrecognizedComponentException,
                                            ManagementException
Get the set of components that use or make reference to a specified component. For example, if an SBB identified by the SbbID sbb uses a profile specification identified by the ProfileSpecificationID profSpec, the array returned from getReferringComponents(profSpec) will contain sbb.
Returns:
an array of component identifiers for the components that use or make reference to the component identified by id.
Throws:
java.lang.NullPointerException - if id is null.
UnrecognizedComponentException - if id is not a recognizable ComponentID object for the SLEE or it does not correspond with a component installed in the SLEE.
ManagementException - if the identifiers could not be obtained due to a system-level failure.

getDescriptor

public DeployableUnitDescriptor getDescriptor(DeployableUnitID id)
                                       throws java.lang.NullPointerException,
                                              UnrecognizedDeployableUnitException,
                                              ManagementException
Get the deployable unit descriptor for a deployable unit.
Parameters:
id - the identifier of the deployable unit.
Returns:
the deployable unit descriptor for the deployable unit.
Throws:
java.lang.NullPointerException - if id is null.
UnrecognizedDeployableUnitException - if id is not a recognizable DeployableUnitID object for the SLEE or it does not correspond with a deployable unit installed in the SLEE.
ManagementException - if the descriptor could not be obtained due to a system-level failure.

getDescriptors

public DeployableUnitDescriptor[] getDescriptors(DeployableUnitID[] ids)
                                          throws java.lang.NullPointerException,
                                                 ManagementException
Get an array of deployable unit descriptors corresponding to an array of deployable units.
Parameters:
ids - the array of deployable unit identifiers.
Returns:
an array of deployable unit descriptors. This array will be the same length as the supplied array, and if descriptors == getDescriptors(ids) then descriptors[i] == getDescriptor(ids[i]). Any unrecognized deployable unit identifier present in ids results in a null value at the corresponding array index in this array.
Throws:
java.lang.NullPointerException - if ids is null.
ManagementException - if the descriptors could not be obtained due to a system-level failure.

getDescriptor

public ComponentDescriptor getDescriptor(ComponentID id)
                                  throws java.lang.NullPointerException,
                                         UnrecognizedComponentException,
                                         ManagementException
Get the component descriptor for a component identifier.
Parameters:
id - the identifier of the component.
Returns:
the component descriptor for the component.
Throws:
java.lang.NullPointerException - if id is null.
UnrecognizedComponentException - if id is not a recognizable ComponentID object for the SLEE or it does not correspond with a component installed in the SLEE.
ManagementException - if the descriptor could not be obtained due to a system-level failure.

getDescriptors

public ComponentDescriptor[] getDescriptors(ComponentID[] ids)
                                     throws java.lang.NullPointerException,
                                            ManagementException
Get an array of component descriptors corresponding to an array of component identifiers.
Parameters:
ids - the array of component identifiers.
Returns:
an array of component descriptors. This array will be the same length as the supplied array, and if descriptors == getDescriptors(ids) then descriptors[i] == getDescriptor(ids[i]). Any unrecognized component identifier present in ids results in a null value at the corresponding array index in this array.
Throws:
java.lang.NullPointerException - if ids is null.
ManagementException - if the descriptors could not be obtained due to a system-level failure.

isInstalled

public boolean isInstalled(DeployableUnitID id)
                    throws java.lang.NullPointerException,
                           ManagementException
Test for the presence of a deployable unit.
Parameters:
id - the identifier of the deployable unit.
Returns:
true if id is a recognizable deployable unit identifier for the SLEE and it corresponds to a deployable unit that is currently installed in the SLEE, false otherwise.
Throws:
java.lang.NullPointerException - if id is null.
ManagementException - if the presence of the deployable unit could not be determined due to a system-level failure.

isInstalled

public boolean isInstalled(ComponentID id)
                    throws java.lang.NullPointerException,
                           ManagementException
Test for the presence of a component.
Parameters:
id - the identifier of the component.
Returns:
true if id is a recognizable component identifier for the SLEE and it corresponds to a component that is currently installed in the SLEE, false otherwise.
Throws:
java.lang.NullPointerException - if id is null.
ManagementException - if the presence of the component could not be determined due to a system-level failure.