javax.slee.management
Class ComponentDescriptor

java.lang.Object
  extended by javax.slee.management.ComponentDescriptor
All Implemented Interfaces:
java.io.Serializable, VendorExtensions
Direct Known Subclasses:
EventTypeDescriptor, LibraryDescriptor, ProfileSpecificationDescriptor, ResourceAdaptorDescriptor, ResourceAdaptorTypeDescriptor, SbbDescriptor, ServiceDescriptor

public abstract class ComponentDescriptor
extends java.lang.Object
implements VendorExtensions, java.io.Serializable

The ComponentDescriptor class is the common base class for all component descriptors. All deployable components installed in the SLEE have a descriptor containing deployment-related information, specified as a derivitive class of ComponentDescriptor.

See Also:
Serialized Form

Constructor Summary
protected ComponentDescriptor(ComponentID component, DeployableUnitID deployableUnit, java.lang.String source, LibraryID[] libraries)
          Create a new component descriptor.
 
Method Summary
static void disableVendorDataDeserialization()
          Disable the deserialization of vendor-specific data for objects of this class and its subclasses.
static void disableVendorDataSerialization()
          Disable the serialization of vendor-specific data for objects of this class and its subclasses.
static void enableVendorDataDeserialization()
          Enable the deserialization of vendor-specific data for objects of this class and its subclasses.
static void enableVendorDataSerialization()
          Enable the serialization of vendor-specific data for objects of this class and its subclasses.
 boolean equals(java.lang.Object obj)
          Compare this component descriptor for equality with another object.
 DeployableUnitID getDeployableUnit()
          Get the identifier of the deployable unit from which this component was installed.
 ComponentID getID()
          Get the component identifier for this descriptor.
 LibraryID[] getLibraries()
          Get the component identifiers of libraries used by this component.
 java.lang.String getName()
          Get the name of the component.
 java.lang.String getSource()
          Get the name of the source object from which this component was installed.
 java.lang.String getVendor()
          Get the vendor of the component.
 java.lang.Object getVendorData()
          Get the vendor-specific data.
 java.lang.String getVersion()
          Get the version of the component.
 int hashCode()
          Get a hash code value for this component descriptor.
 void setVendorData(java.lang.Object vendorData)
          Set the vendor-specific data.
protected  void toString(java.lang.StringBuffer buf)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentDescriptor

protected ComponentDescriptor(ComponentID component,
                              DeployableUnitID deployableUnit,
                              java.lang.String source,
                              LibraryID[] libraries)
Create a new component descriptor.

Parameters:
component - the identifier of the component.
deployableUnit - the identifier of the deployable unit from which the component was installed.
source - the source object (component jar or service XML file) within the deployable unit from which this component was installed.
libraries - the identifiers of the libraries that the component depends on.
Throws:
java.lang.NullPointerException - if any argument is null.
Method Detail

getDeployableUnit

public final DeployableUnitID getDeployableUnit()
Get the identifier of the deployable unit from which this component was installed.

Returns:
the identifier of the deployable unit from which this component was installed.

getSource

public final java.lang.String getSource()
Get the name of the source object from which this component was installed. For services, this is the name of the deployment descriptor XML file specified in the respective <service-xml> element of the enclosing deployable unit's deployment descriptor. For components installed from a component jar file, the source is the name of the component jar file as specified in the respective <jar> element of the enclosing deployable unit's deployment descriptor.

Returns:
the name of the source object from where this component was installed.

getID

public final ComponentID getID()
Get the component identifier for this descriptor.

Returns:
the component identifier for this descriptor.

getName

public final java.lang.String getName()
Get the name of the component.

Returns:
the name of the component.

getVendor

public final java.lang.String getVendor()
Get the vendor of the component.

Returns:
the vendor of the component.

getVersion

public final java.lang.String getVersion()
Get the version of the component.

Returns:
the version of the component.

getLibraries

public final LibraryID[] getLibraries()
Get the component identifiers of libraries used by this component.

Returns:
the component identifiers of libraries used by this component.

enableVendorDataSerialization

public static void enableVendorDataSerialization()
Enable the serialization of vendor-specific data for objects of this class and its subclasses. This method is typically used by a SLEE implementation that wants to export vendor-specific data with objects of this class to management clients.

By default, any vendor-specific data included in an object of this class will not be included in the serialization stream when the object is serialized. Invoking this method changes this behavior so that vendor-specific data is included in the serialization stream when an object of this class is serialized.

This method should only be invoked if the vendor-specific data is serializable via standard Java serialization means.

Since:
SLEE 1.1
See Also:
disableVendorDataSerialization(), setVendorData(java.lang.Object)

disableVendorDataSerialization

public static void disableVendorDataSerialization()
Disable the serialization of vendor-specific data for objects of this class and its subclasses.

If the serialization of vendor-specific data for objects of this class has been enabled via the enableVendorDataSerialization() method, this method disables that behavior again.

Since:
SLEE 1.1

enableVendorDataDeserialization

public static void enableVendorDataDeserialization()
Enable the deserialization of vendor-specific data for objects of this class and its subclasses. This method is typically used by a management client that wants to obtain any vendor-specific data included in the serialization stream of objects of this class.

By default, any vendor-specific data included in the serialization stream of objects of this class is discarded upon deserialization. Invoking this method changes that behavior so that the vendor-specific data is also deserialized when an object of this class is deserialized. A management client that enables the deserialization of vendor-specific data must ensure that any necessary classes required to deserialize that data is available in the relevant classloader.

Since:
SLEE 1.1
See Also:
disableVendorDataDeserialization(), getVendorData()

disableVendorDataDeserialization

public static void disableVendorDataDeserialization()
Disable the deserialization of vendor-specific data for objects of this class and its subclasses.

If the deserialization of vendor-specific data for objects of this class has been enabled via the enableVendorDataDeserialization() method, this method disables that behavior again.

Since:
SLEE 1.1

setVendorData

public void setVendorData(java.lang.Object vendorData)
Set the vendor-specific data.

Specified by:
setVendorData in interface VendorExtensions
Parameters:
vendorData - the vendor-specific data.
Since:
SLEE 1.1

getVendorData

public java.lang.Object getVendorData()
Get the vendor-specific data.

Specified by:
getVendorData in interface VendorExtensions
Returns:
the vendor-specific data.
Since:
SLEE 1.1

equals

public final boolean equals(java.lang.Object obj)
Compare this component descriptor for equality with another object.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the object to compare this with.
Returns:
true if obj is a component descriptor that has the same component identifier as this, false otherwise.
See Also:
Object.equals(Object)

hashCode

public final int hashCode()
Get a hash code value for this component descriptor.

Overrides:
hashCode in class java.lang.Object
Returns:
a hash code value for this descriptor.
See Also:
Object.hashCode()

toString

protected final void toString(java.lang.StringBuffer buf)


Copyright © 2009. All Rights Reserved.