|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.core.base.Adaptee
org.norther.tammi.core.base.DefaultObjectFactory
org.norther.tammi.core.rt.DefaultVariableRegistry
public class DefaultVariableRegistry
A default implementation of VariableRegistry.
| Field Summary |
|---|
| Fields inherited from class org.norther.tammi.core.base.Adaptee |
|---|
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS |
| Fields inherited from interface org.norther.tammi.core.base.MBeanDelegate |
|---|
ARRAY_TYPE, OBJECT_TYPE, PRIMITIVE_TYPE, STRING_TYPE |
| Constructor Summary | |
|---|---|
DefaultVariableRegistry()
Constructs a new registry. |
|
| 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. |
Object |
getInstance(String className,
ObjectName loader,
Object[] params,
String[] signature)
Gets an instance of a named class using a specified class loader. |
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. |
void |
unmanaged()
This method is called when the implementing adaptee is unmanaged either during pre-deregistration of the corresponding adapter MBean or just before it is explicitly removed from the adapter MBean during run-time. |
| Methods inherited from class org.norther.tammi.core.base.DefaultObjectFactory |
|---|
getInstance, getInstance, getInstance, isLoaderSupported |
| Methods inherited from class org.norther.tammi.core.base.Adaptee |
|---|
addAdaptee, addNotificationListener, getAttributeSupport, getBroker, getCanonicalName, getDomain, getFactory, getLoader, getLog, getLog, getMBean, getMBeanServer, getNotificationInfo, getObjectName, getRegistrationTime, getSequenceNumber, hasListeners, isRegistered, postmanaged, premanaged, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, unregister |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.norther.tammi.core.base.ObjectFactory |
|---|
getInstance, getInstance, getInstance, isLoaderSupported |
| Constructor Detail |
|---|
public DefaultVariableRegistry()
| Method Detail |
|---|
public void unmanaged()
throws Exception
Manageable
unmanaged in interface Manageableunmanaged in class AdapteeException - if the adaptee refused to be unmanaged.public String getDefaultBaseClassName()
VariableRegistry
getDefaultBaseClassName in interface VariableRegistrypublic void setDefaultBaseClassName(String className)
VariableRegistry
setDefaultBaseClassName in interface VariableRegistryclassName - the default base class name.public String getDefaultVariableClassName()
VariableRegistry
getDefaultVariableClassName in interface VariableRegistrypublic void setDefaultVariableClassName(String className)
VariableRegistry
setDefaultVariableClassName in interface VariableRegistryclassName - the default variable class name.public boolean isLocalizedVariables()
VariableRegistry
isLocalizedVariables in interface VariableRegistrypublic void setLocalizedVariables(boolean flag)
VariableRegistry
setLocalizedVariables in interface VariableRegistryflag - true if localized, otherwise false.public boolean isTypeRegistered(String type)
VariableRegistry
isTypeRegistered in interface VariableRegistrytype - the variable type.
public List getAttributeList(String type)
VariableRegistry
getAttributeList in interface VariableRegistrytype - the variable type.
public OrderedMap getAttributeMap(String type)
VariableRegistry
getAttributeMap in interface VariableRegistrytype - the variable type.
public Collection getAttributeInfo(String type)
VariableRegistry
getAttributeInfo in interface VariableRegistrytype - the variable type.
public void setAttributeInfo(String type,
Collection attributes)
VariableRegistry
setAttributeInfo in interface VariableRegistrytype - the variable type.attributes - a collection of MBeanAttributeInfo instances.public String getVariableClassName(String type)
VariableRegistry
getVariableClassName in interface VariableRegistrytype - the variable type.
public void setVariableClassName(String type,
String className)
VariableRegistry
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.
setVariableClassName in interface VariableRegistrytype - the variable type.className - the variable class name or null.public String getImporterClassName(String type)
VariableRegistry
getImporterClassName in interface VariableRegistrytype - the variable type.
public void setImporterClassName(String type,
String className)
VariableRegistry
The importer class has to implement the AttributeImporter
interface.
setImporterClassName in interface VariableRegistrytype - the variable type.className - the importer class name or null.public AttributeImporter getAttributeImporter(String type)
VariableRegistry
getAttributeImporter in interface VariableRegistrytype - the variable type.
public void setAttributeImporter(String type,
AttributeImporter importer)
VariableRegistry
setAttributeImporter in interface VariableRegistrytype - the variable type.importer - the importer or null.public String getExporterClassName(String type)
VariableRegistry
getExporterClassName in interface VariableRegistrytype - the variable type.
public void setExporterClassName(String type,
String className)
VariableRegistry
The exporter class has to implement the AttributeExporter
interface.
setExporterClassName in interface VariableRegistrytype - the variable type.className - the exporter class name or null.public AttributeExporter getAttributeExporter(String type)
VariableRegistry
getAttributeExporter in interface VariableRegistrytype - the variable type.
public void setAttributeExporter(String type,
AttributeExporter exporter)
VariableRegistry
setAttributeExporter in interface VariableRegistrytype - the variable type.exporter - the exporter or null.public String getValidatorClassName(String type)
VariableRegistry
getValidatorClassName in interface VariableRegistrytype - the variable type.
public void setValidatorClassName(String type,
String className)
VariableRegistry
The validator class has to implement the AttributeValidator
interface.
setValidatorClassName in interface VariableRegistrytype - the variable type.className - the validator class name or null.public AttributeValidator getAttributeValidator(String type)
VariableRegistry
getAttributeValidator in interface VariableRegistrytype - the variable type.
public void setAttributeValidator(String type,
AttributeValidator validator)
VariableRegistry
setAttributeValidator in interface VariableRegistrytype - the variable type.validator - the validator or null.public ObjectName getNamePattern(String type)
VariableRegistry
getNamePattern in interface VariableRegistrytype - the variable type.
public void setNamePattern(String type,
ObjectName pattern)
VariableRegistry
setNamePattern in interface VariableRegistrytype - the variable type.pattern - the name pattern or null.
public void setAttributeInfo(String type,
String className,
Collection attributes)
VariableRegistry
setAttributeInfo in interface VariableRegistrytype - the variable type.className - the variable class name.attributes - a collection of MBeanAttributeInfo instances.
public void setAttributeInfo(String type,
Collection attributes,
String validatorClassName)
VariableRegistry
setAttributeInfo in interface VariableRegistrytype - the variable type.attributes - a collection of MBeanAttributeInfo instances.validatorClassName - the validator class name.
public void setAttributeInfo(String type,
String className,
Collection attributes,
String validatorClassName)
VariableRegistry
setAttributeInfo in interface VariableRegistrytype - the variable type.className - the variable class name.attributes - a collection of MBeanAttributeInfo instances.validatorClassName - the validator class name.
public void setAttributeInfo(String type,
String className,
Collection attributes,
String validatorClassName,
ObjectName pattern)
VariableRegistry
setAttributeInfo in interface VariableRegistrytype - 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.
public void setAttributeInfo(String type,
String className,
String importerClassName,
String exporterClassName,
Collection attributes,
String validatorClassName,
ObjectName pattern)
VariableRegistry
setAttributeInfo in interface VariableRegistrytype - 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.public void removeAttributeInfo(String type)
VariableRegistry
removeAttributeInfo in interface VariableRegistrytype - the variable type.public void clearAllTypes()
VariableRegistry
clearAllTypes in interface VariableRegistrypublic Set typeSet()
VariableRegistry
typeSet in interface VariableRegistrypublic Set typeSet(String prefix)
VariableRegistry
typeSet in interface VariableRegistryprefix - a prefix.
public Class defineVariableClass(String className)
throws ClassNotFoundException,
ClassFormatError
VariableRegistry
defineVariableClass in interface VariableRegistryclassName - the class name of the variable.
ClassNotFoundException - for missing classes.
ClassFormatError - if the class hierarchy is invalid.
public Class defineVariableClass(String className,
String superName)
throws ClassNotFoundException,
ClassFormatError
VariableRegistry
defineVariableClass in interface VariableRegistryclassName - the class name of the variable.superName - the super class name.
ClassNotFoundException - for missing classes.
ClassFormatError - if the class hierarchy is invalid.
public Class defineVariableClass(String className,
Class superClass)
throws ClassFormatError
VariableRegistry
defineVariableClass in interface VariableRegistryclassName - the class name of the variable.superClass - the super class.
ClassFormatError - if the class hierarchy is invalid.
public Variable createVariable(String type)
throws ConstructionException
VariableRegistry
createVariable in interface VariableRegistrytype - the type of the variable.
ConstructionException - if construction fails.
public Object getInstance(String className,
ObjectName loader,
Object[] params,
String[] signature)
throws ConstructionException
ObjectFactoryClass loaders are supported only if the isLoaderSupported method returns true. Otherwise the loader parameter is ignored.
getInstance in interface ObjectFactorygetInstance in class DefaultObjectFactoryclassName - the name of the class.loader - the class loader.params - an array containing the parameters of the constructor.signature - an array containing the signature of the constructor.
ConstructionException - if construction fails.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||