FileDocCategorySizeDatePackage
PropertiesAccess.javaAPI DocGlassfish v2 API4336Fri May 04 22:30:36 BST 2007com.sun.appserv.management.config

PropertiesAccess

public interface PropertiesAccess
All MBeans that have Properties must extend this interface.

Properties are always Strings. Property names are required to be unique.

To specify properties when creating any type of {@link AMXConfig} which (the AMXConfig must extend PropertiesAccess), add them to the optional Map when creating it:


final Map optional = new HashMap();
optional.put( PropertiesAccess.PROPERTY_PREFIX + "prop1", prop1Value );
optional.put( PropertiesAccess.PROPERTY_PREFIX + "prop2", prop2Value );
...

Fields Summary
static final String
PROPERTY_PREFIX
When a key is required for a property in a Map, its name must consist of this prefix plus the actual name. When accessing a property directly, this prefix must not be used.
Constructors Summary
Methods Summary
public voidcreateProperty(java.lang.String propertyName, java.lang.String propertyValue)
Create a new property.

param
propertyName the name of the property
param
propertyValue the value of the property

public booleanexistsProperty(java.lang.String propertyName)
Return true if any properties exist with the specified name.

param
propertyName the name of the property

public java.util.MapgetProperties()

return
Map containing all properties, keyed by name

public java.lang.String[]getPropertyNames()
Get the names of all properties.

public java.lang.StringgetPropertyValue(java.lang.String propertyName)
Get the value of a property.

param
propertyName the name of the property

public voidremoveProperty(java.lang.String propertyName)
Remove a property with the specified name.

param
propertyName the name of the property

public voidsetPropertyValue(java.lang.String propertyName, java.lang.String propertyValue)
Set the value of a property. The property must already exist. The existing description is retained.

param
propertyName the name of the property
param
propertyValue the value of the property