Package org.glassfish.deployment.common
Class DynamicAttributesDescriptor
java.lang.Object
java.util.Observable
org.glassfish.deployment.common.DynamicAttributesDescriptor
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Descriptor
This class is a value holder for dynamic attributes. Dynamic attributes
can be added, queried and removed from this value holder. Attributes are
identified by a string key.
- Author:
- Jerome Dochez
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExtraAttribute(String name, Object value) Add a new dynamic attribte<T> TgetExtraAttribute(String name) Obtain a dynamic attribute from the repositoryDirect acess to the dynamic attributes repositoryvoidprint(StringBuffer toStringBuffer) voidremoveExtraAttribute(String name) Removes a dynamic attribute from the repositorytoString()Provides a meaningfull string about ourself.Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
-
Constructor Details
-
DynamicAttributesDescriptor
public DynamicAttributesDescriptor()
-
-
Method Details
-
getExtraAttributes
Direct acess to the dynamic attributes repository- Returns:
- the Map of dynamic attributes
-
addExtraAttribute
Add a new dynamic attribte- Parameters:
name- the attribute namevalue- the attribute value
-
getExtraAttribute
Obtain a dynamic attribute from the repository- Parameters:
name- the attribute name- Returns:
- the attribute value of null of non existent
-
removeExtraAttribute
Removes a dynamic attribute from the repository- Parameters:
name- the attribute name
-
print
-
toString
Provides a meaningfull string about ourself.No Descriptor class which inherits this class should override this method. Rather print() method which is defined in this class should be overridden to describe itself. Refer to the comments on print() method for more details.
This method is optimized for persformance reasons.
-