|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface VariableRegistry
An interface to variable registries and variable factories.
| Method Summary | |
|---|---|
void |
clearAllTypes()
Clears registered attributes of all variable types. |
Variable |
createVariable(String type)
Creates a new variable instance of the specified type. |
Class |
defineVariableClass(String className)
Defines a new variable of the named class. |
Class |
defineVariableClass(String className,
Class superClass)
Defines a new variable of the named class extending the specified super class. |
Class |
defineVariableClass(String className,
String superName)
Defines a new variable of the named class extending the named super class. |
AttributeExporter |
getAttributeExporter(String type)
Gets the registered exporter of the specified variable type. |
AttributeImporter |
getAttributeImporter(String type)
Gets the registered importer of the specified variable type. |
Collection |
getAttributeInfo(String type)
Gets a registered attribute collection of locked attributes of the specified variable type. |
List |
getAttributeList(String type)
Gets a registered attribute list of cloned and unlocked attributes of the specified variable type. |
OrderedMap |
getAttributeMap(String type)
Gets a registered attribute map of locked attributes of the specified variable type. |
AttributeValidator |
getAttributeValidator(String type)
Gets the registered validator of the specified variable type. |
String |
getDefaultBaseClassName()
Gets the default base class name applied to defined variable classes. |
String |
getDefaultVariableClassName()
Gets the default variable class name applied to virtual variable types. |
String |
getExporterClassName(String type)
Gets the exporter class name of the specified variable type. |
String |
getImporterClassName(String type)
Gets the importer class name of the specified variable type. |
ObjectName |
getNamePattern(String type)
Gets the name pattern of the specified variable type. |
String |
getValidatorClassName(String type)
Gets the validator class name of the specified variable type. |
String |
getVariableClassName(String type)
Gets the variable class name of the specified variable type. |
boolean |
isLocalizedVariables()
Checks whether variables in this registry are localized. |
boolean |
isTypeRegistered(String type)
Checks whether the specified variable type is registered. |
void |
removeAttributeInfo(String type)
Removes registered attributes of the specified variable type. |
void |
setAttributeExporter(String type,
AttributeExporter exporter)
Sets the registered exporter of the specified variable type. |
void |
setAttributeImporter(String type,
AttributeImporter importer)
Sets the registered importer of the specified variable type. |
void |
setAttributeInfo(String type,
Collection attributes)
Sets registered attributes of the specified variable type. |
void |
setAttributeInfo(String type,
Collection attributes,
String validatorClassName)
Sets registered attributes and a validator class for the specified variable type. |
void |
setAttributeInfo(String type,
String className,
Collection attributes)
Sets registered attributes and a variable class for the specified variable type. |
void |
setAttributeInfo(String type,
String className,
Collection attributes,
String validatorClassName)
Sets registered attributes, a variable class and a validator class for the specified variable type. |
void |
setAttributeInfo(String type,
String className,
Collection attributes,
String validatorClassName,
ObjectName pattern)
Sets registered attributes, a variable class, a validator class and an optional object name pattern for the specified variable type. |
void |
setAttributeInfo(String type,
String className,
String importerClassName,
String exporterClassName,
Collection attributes,
String validatorClassName,
ObjectName pattern)
Sets registered attributes, a variable class, an importer class, an exporter class, a validator class and an optional object name pattern for the specified variable type. |
void |
setAttributeValidator(String type,
AttributeValidator validator)
Sets the registered validator of the specified variable type. |
void |
setDefaultBaseClassName(String className)
Sets the default base class name applied to defined variable classes. |
void |
setDefaultVariableClassName(String className)
Sets the default variable class name applied to virtual variable types. |
void |
setExporterClassName(String type,
String className)
Sets the exporter class name of the specified variable type. |
void |
setImporterClassName(String type,
String className)
Sets the importer class name of the specified variable type. |
void |
setLocalizedVariables(boolean flag)
Sets whether variables in this registry are localized. |
void |
setNamePattern(String type,
ObjectName pattern)
Sets the name pattern of the specified variable type. |
void |
setValidatorClassName(String type,
String className)
Sets the validator class name of the specified variable type. |
void |
setVariableClassName(String type,
String className)
Sets the variable class name of the specified variable type. |
Set |
typeSet()
Returns a read-only set of registered variable types. |
Set |
typeSet(String prefix)
Returns a set of registered variable types with the given prefix. |
| Methods inherited from interface org.norther.tammi.core.base.ObjectFactory |
|---|
getInstance, getInstance, getInstance, getInstance, isLoaderSupported |
| Method Detail |
|---|
String getDefaultBaseClassName()
void setDefaultBaseClassName(String className)
className - the default base class name.String getDefaultVariableClassName()
void setDefaultVariableClassName(String className)
className - the default variable class name.boolean isLocalizedVariables()
void setLocalizedVariables(boolean flag)
flag - true if localized, otherwise false.boolean isTypeRegistered(String type)
type - the variable type.
List getAttributeList(String type)
type - the variable type.
OrderedMap getAttributeMap(String type)
type - the variable type.
Collection getAttributeInfo(String type)
type - the variable type.
void setAttributeInfo(String type,
Collection attributes)
type - the variable type.attributes - a collection of MBeanAttributeInfo instances.String getVariableClassName(String type)
type - the variable type.
void setVariableClassName(String type,
String className)
The variable class has to implement the Variable interface
and provide a constructor with three parameters. The first one for the
MBean server of type javax.management.MBeanServer, the
second one for the object name of the variable registry of type
javax.management.ObjectName and the third one for the
variable type of type java.lang.String.
If the named variable class is not available, it will be dynamically
defined to be a subclass of VariableX.
type - the variable type.className - the variable class name or null.String getImporterClassName(String type)
type - the variable type.
void setImporterClassName(String type,
String className)
The importer class has to implement the AttributeImporter
interface.
type - the variable type.className - the importer class name or null.AttributeImporter getAttributeImporter(String type)
type - the variable type.
void setAttributeImporter(String type,
AttributeImporter importer)
type - the variable type.importer - the importer or null.String getExporterClassName(String type)
type - the variable type.
void setExporterClassName(String type,
String className)
The exporter class has to implement the AttributeExporter
interface.
type - the variable type.className - the exporter class name or null.AttributeExporter getAttributeExporter(String type)
type - the variable type.
void setAttributeExporter(String type,
AttributeExporter exporter)
type - the variable type.exporter - the exporter or null.String getValidatorClassName(String type)
type - the variable type.
void setValidatorClassName(String type,
String className)
The validator class has to implement the AttributeValidator
interface.
type - the variable type.className - the validator class name or null.AttributeValidator getAttributeValidator(String type)
type - the variable type.
void setAttributeValidator(String type,
AttributeValidator validator)
type - the variable type.validator - the validator or null.ObjectName getNamePattern(String type)
type - the variable type.
void setNamePattern(String type,
ObjectName pattern)
type - the variable type.pattern - the name pattern or null.
void setAttributeInfo(String type,
String className,
Collection attributes)
type - the variable type.className - the variable class name.attributes - a collection of MBeanAttributeInfo instances.
ClassCastException - if class name is invalid.
void setAttributeInfo(String type,
Collection attributes,
String validatorClassName)
type - the variable type.attributes - a collection of MBeanAttributeInfo instances.validatorClassName - the validator class name.
ClassCastException - if class name is invalid.
void setAttributeInfo(String type,
String className,
Collection attributes,
String validatorClassName)
type - the variable type.className - the variable class name.attributes - a collection of MBeanAttributeInfo instances.validatorClassName - the validator class name.
ClassCastException - if class name is invalid.
void setAttributeInfo(String type,
String className,
Collection attributes,
String validatorClassName,
ObjectName pattern)
type - the variable type.className - the variable class name.attributes - a collection of MBeanAttributeInfo instances.validatorClassName - the validator class name.pattern - an optional object name pattern.
ClassCastException - if class name is invalid.
void setAttributeInfo(String type,
String className,
String importerClassName,
String exporterClassName,
Collection attributes,
String validatorClassName,
ObjectName pattern)
type - the variable type.className - the variable class name.importerClassName - the importer class name.exporterClassName - the exporter class name.attributes - a collection of MBeanAttributeInfo instances.validatorClassName - the validator class name.pattern - an optional object name pattern.
ClassCastException - if class name is invalid.void removeAttributeInfo(String type)
type - the variable type.void clearAllTypes()
Set typeSet()
Set typeSet(String prefix)
prefix - a prefix.
Class defineVariableClass(String className)
throws ClassNotFoundException,
ClassFormatError
className - the class name of the variable.
ClassNotFoundException - for missing classes.
ClassFormatError - if the class hierarchy is invalid.
Class defineVariableClass(String className,
String superName)
throws ClassNotFoundException,
ClassFormatError
className - the class name of the variable.superName - the super class name.
ClassNotFoundException - for missing classes.
ClassFormatError - if the class hierarchy is invalid.
Class defineVariableClass(String className,
Class superClass)
throws ClassFormatError
className - the class name of the variable.superClass - the super class.
ClassFormatError - if the class hierarchy is invalid.
Variable createVariable(String type)
throws ConstructionException
type - the type of the variable.
ConstructionException - if construction fails.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||