|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.core.rt.Introspector
public class Introspector
An introspector for Variables.
Note that the instrospector is not thread-safe.
| Constructor Summary | |
|---|---|
Introspector()
Constructs a new introspector. |
|
Introspector(MBeanServer server)
Constructs a new introspector for a specific server. |
|
| Method Summary | |
|---|---|
void |
addValue(Variable variable,
String name,
int index,
Object value)
Adds the indexed element to the named array attribute of the specified variable. |
void |
addValue(Variable variable,
String name,
Object value)
Adds an element to the named array attribute of the specified variable. |
protected void |
clearResourceCache()
Clears the resource cache. |
boolean |
contains(Variable variable,
String name)
Checks whether the specified variable contains the named attribute. |
Variable |
create()
Creates an empty variable MBean instance. |
Variable |
create(Object source)
Creates a variable MBean instance with imported attributes. |
Variable |
create(String type)
Creates a typed variable MBean instance. |
Variable |
create(String type,
Object source)
Creates a typed variable MBean instance with imported attributes. |
protected Variable |
createVariable(String type)
Creates a variable MBean instance. |
boolean |
exportTo(Variable variable,
Object target)
Exports the specified variable to another object. |
boolean |
exportTo(Variable variable,
Object target,
AttributeFilter filter)
Exports the specified variable to another object by applying a filter. |
Comparator |
getComparator(MBeanAttributeInfo attribute)
Gets the comparator of the specified attribute. |
protected Converter |
getConverter()
Gets the referent of the converter MBean. |
Locale |
getDefaultLocale()
Gets the default locale. |
String |
getDescription(Variable variable,
MBeanAttributeInfo attribute)
Gets the specified attribute description. |
String |
getDetail(Variable variable,
MBeanAttributeInfo attribute)
Gets the specified attribute detail. |
EnumeratedList |
getEnumeration(Variable variable,
MBeanAttributeInfo attribute)
Gets the specified attribute value enumeration as a list of localized enumeration attributes. |
String |
getGroup(Variable variable,
MBeanAttributeInfo attribute)
Gets the specified attribute group. |
VariableAttributeInfo |
getInfo(Variable variable,
String name)
Gets the named attribute info of the specified variable. |
VariableAttributeInfo |
getInfo(Variable variable,
String name,
boolean unlocked)
Gets the named and optionally unlocked attribute info of the specified variable. |
Object |
getKeyValue(Variable variable,
String name)
Gets the named key attribute value of the specified variable. |
List |
getList(Variable variable)
Gets the attribute info list of the specified variable. |
List |
getList(Variable variable,
boolean unlocked)
Gets the optionally unlocked attribute info list of the specified variable. |
Locale |
getLocale()
Gets the locale to apply. |
Number |
getMax(MBeanAttributeInfo attribute)
Gets the maximum value of the specified attribute. |
protected MBeanServer |
getMBeanServer()
Gets a reference to the MBean server. |
Number |
getMin(MBeanAttributeInfo attribute)
Gets the minimum value of the specified attribute. |
String |
getPattern(MBeanAttributeInfo attribute)
Gets the pattern of the specified attribute. |
protected String |
getResource(Variable variable,
MBeanAttributeInfo attribute,
String key)
Gets an attribute resource. |
protected LookupResourceBundle |
getResourceBundle(String baseName)
Gets the resource bundle for a base name. |
protected LookupResourceBundle |
getResourceBundle(Variable variable,
MBeanAttributeInfo attribute)
Gets the resource bundle for an attribute. |
protected String |
getResourceBundleName(String baseName)
Gets the resource bundle name for a base name. |
protected String |
getResourceBundleName(Variable variable,
MBeanAttributeInfo attribute)
Gets the resource bundle name for an attribute. |
protected ResourceMap |
getResourceMap()
Gets the resource map MBean. |
Object |
getValue(Variable variable,
String name)
Gets the named attribute value of the specified variable. |
Object |
getValue(Variable variable,
String name,
int index)
Gets the indexed element of the named array attribute of the specified variable. |
protected VariableRegistry |
getVariableRegistry()
Gets the referent of the variable registry MBean. |
boolean |
hasConverter(MBeanAttributeInfo attribute)
Checks the converter of the specified attribute. |
boolean |
importFrom(Variable variable,
Object source)
Imports the specified variable from another object. |
boolean |
importFrom(Variable variable,
Object source,
AttributeFilter filter)
Imports the specified variable from another object by applying a filter. |
boolean |
isArray(MBeanAttributeInfo attribute)
Checks if the specified attribute is an array. |
boolean |
isBlankAccepted(MBeanAttributeInfo attribute)
Checks if the specified attribute accepts blank strings. |
boolean |
isCloneable(MBeanAttributeInfo attribute)
Checks if the specified attribute is cloneable. |
boolean |
isCorrelative(MBeanAttributeInfo attribute)
Checks if the specified attribute is correlative. |
boolean |
isDisabled(MBeanAttributeInfo attribute)
Checks if the specified attribute is disabled. |
boolean |
isEmptyAccepted(MBeanAttributeInfo attribute)
Checks if the specified attribute is empty arrays. |
boolean |
isEnumerated(MBeanAttributeInfo attribute)
Checks if the specified attribute is enumerated. |
boolean |
isInteractive(MBeanAttributeInfo attribute)
Checks if the specified attribute is interactive. |
boolean |
isLocal(MBeanAttributeInfo attribute)
Checks if the specified attribute is local. |
boolean |
isLocalized(MBeanAttributeInfo attribute)
Checks if the specified attribute is localized. |
boolean |
isLocalizedVariables()
Checks whether variables are localized. |
boolean |
isMandatory(MBeanAttributeInfo attribute)
Checks if the specified attribute is mandatory. |
boolean |
isOrdered(MBeanAttributeInfo attribute)
Checks if the specified attribute is ordered. |
boolean |
isReadable(MBeanAttributeInfo attribute)
Checks if the specified attribute is readable. |
boolean |
isSerialized(MBeanAttributeInfo attribute)
Checks if the specified attribute is serialized. |
boolean |
isSorted(MBeanAttributeInfo attribute)
Checks if the specified attribute is sorted. |
boolean |
isTraceable(MBeanAttributeInfo attribute)
Checks if the specified attribute is traceable. |
boolean |
isTransient(MBeanAttributeInfo attribute)
Checks if the specified attribute is transient. |
boolean |
isTrimmed(MBeanAttributeInfo attribute)
Checks if the specified attribute is trimmed. |
boolean |
isVisible(MBeanAttributeInfo attribute)
Checks if the specified attribute is visible. |
boolean |
isWritable(MBeanAttributeInfo attribute)
Checks if the specified attribute is writable. |
int |
length(Variable variable,
String name)
Returns the length of the specified array attribute. |
Object |
removeValue(Variable variable,
String name,
int index)
Removes the indexed element from the named array attribute of the specified variable. |
boolean |
removeValue(Variable variable,
String name,
Object value)
Removes an element from the named array attribute of the specified variable. |
void |
setLocale(Locale locale)
Sets the locale to apply. |
void |
setValue(Variable variable,
String name,
int index,
Object value)
Sets the indexed element of the named array attribute of the specified variable. |
void |
setValue(Variable variable,
String name,
Object value)
Sets the named attribute value of the specified variable. |
void |
setValue(Variable variable,
String name,
Object value,
boolean forced)
Sets the named attribute value of the specified variable optionally by-passing attribute's current writable and mandatory settings. |
String |
toString(Variable variable,
String name)
Returns the specified attribute value as a localized string. |
String[] |
toStrings(Variable variable,
String name)
Returns the specified attribute values as a localized string array. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Introspector()
public Introspector(MBeanServer server)
server - the MBean server.| Method Detail |
|---|
public Variable create()
throws ConstructionException
ConstructionException - if construction fails.
public Variable create(Object source)
throws ConstructionException
source - the source object.
ConstructionException - if construction fails.
public Variable create(String type)
throws ConstructionException
type - the variable type.
ConstructionException - if construction fails.
public Variable create(String type,
Object source)
throws ConstructionException
type - the variable type.source - the source object.
ConstructionException - if construction fails.
public boolean contains(Variable variable,
String name)
variable - the variable.name - the attribute name.
public VariableAttributeInfo getInfo(Variable variable,
String name)
variable - the variable.name - the attribute name.
public VariableAttributeInfo getInfo(Variable variable,
String name,
boolean unlocked)
variable - the variable.name - the attribute name.unlocked - true for unlocked, false otherwise.
public List getList(Variable variable)
variable - the variable.
public List getList(Variable variable,
boolean unlocked)
variable - the variable.unlocked - true for unlocked, false otherwise.
public Object getValue(Variable variable,
String name)
throws AttributeNotFoundException
variable - the variable.name - the attribute name.
AttributeNotFoundException - if not found.
public void setValue(Variable variable,
String name,
Object value)
throws AttributeNotFoundException,
InvalidAttributeValueException
variable - the variable.name - the attribute name.value - the attribute value.
AttributeNotFoundException - if not found.
InvalidAttributeValueException - for an invalid value.
public void setValue(Variable variable,
String name,
Object value,
boolean forced)
throws AttributeNotFoundException,
InvalidAttributeValueException
variable - the variable.name - the attribute name.value - the attribute value.forced - if true, forces the setting.
AttributeNotFoundException - if not found.
InvalidAttributeValueException - for an invalid value.
public Object getValue(Variable variable,
String name,
int index)
throws AttributeNotFoundException
variable - the variable.name - the attribute name.index - the element index.
AttributeNotFoundException - if not found.
public void setValue(Variable variable,
String name,
int index,
Object value)
throws AttributeNotFoundException,
InvalidAttributeValueException
variable - the variable.name - the attribute name.index - the element index.value - the attribute value.
AttributeNotFoundException - if not found.
InvalidAttributeValueException - for an invalid value.
public void addValue(Variable variable,
String name,
Object value)
throws AttributeNotFoundException,
InvalidAttributeValueException
variable - the variable.name - the attribute name.value - the attribute value.
AttributeNotFoundException - if not found.
InvalidAttributeValueException - for an invalid value.
public void addValue(Variable variable,
String name,
int index,
Object value)
throws AttributeNotFoundException,
InvalidAttributeValueException
variable - the variable.name - the attribute name.index - the element index.value - the attribute value.
AttributeNotFoundException - if not found.
InvalidAttributeValueException - for an invalid value.
public boolean removeValue(Variable variable,
String name,
Object value)
throws AttributeNotFoundException
variable - the variable.name - the attribute name.value - the value of the element.
AttributeNotFoundException - if the name is unknown.
public Object removeValue(Variable variable,
String name,
int index)
throws AttributeNotFoundException
variable - the variable.name - the attribute name.index - the element index.
AttributeNotFoundException - if the name is unknown.
public Object getKeyValue(Variable variable,
String name)
throws AttributeNotFoundException
variable - the variable.name - the attribute name.
AttributeNotFoundException - if not found.
public String toString(Variable variable,
String name)
throws AttributeNotFoundException
variable - the variable.name - the attribute name.
AttributeNotFoundException - if not found.
public String[] toStrings(Variable variable,
String name)
throws AttributeNotFoundException
variable - the variable.name - the attribute name.
AttributeNotFoundException - if not found.
public int length(Variable variable,
String name)
throws AttributeNotFoundException
variable - the variable.name - the attribute name.
AttributeNotFoundException - if not found.
public String getDescription(Variable variable,
MBeanAttributeInfo attribute)
variable - the variable.attribute - the attribute.
public String getGroup(Variable variable,
MBeanAttributeInfo attribute)
variable - the variable.attribute - the attribute.
public String getDetail(Variable variable,
MBeanAttributeInfo attribute)
variable - the variable.attribute - the attribute.
public EnumeratedList getEnumeration(Variable variable,
MBeanAttributeInfo attribute)
variable - the variable.attribute - the attribute.
public boolean isVisible(MBeanAttributeInfo attribute)
attribute - the attribute.
public boolean isReadable(MBeanAttributeInfo attribute)
attribute - the attribute.
public boolean isWritable(MBeanAttributeInfo attribute)
attribute - the attribute.
public boolean isCloneable(MBeanAttributeInfo attribute)
attribute - the attribute.
public boolean isMandatory(MBeanAttributeInfo attribute)
attribute - the attribute.
public boolean isTransient(MBeanAttributeInfo attribute)
attribute - the attribute.
public boolean isSerialized(MBeanAttributeInfo attribute)
attribute - the attribute.
public boolean isCorrelative(MBeanAttributeInfo attribute)
attribute - the attribute.
public boolean isInteractive(MBeanAttributeInfo attribute)
attribute - the attribute.
public boolean isLocalized(MBeanAttributeInfo attribute)
attribute - the attribute.
public boolean isOrdered(MBeanAttributeInfo attribute)
attribute - the attribute.
public boolean isSorted(MBeanAttributeInfo attribute)
attribute - the attribute.
public boolean isTraceable(MBeanAttributeInfo attribute)
attribute - the attribute.
public boolean isDisabled(MBeanAttributeInfo attribute)
attribute - the attribute.
public boolean isTrimmed(MBeanAttributeInfo attribute)
attribute - the attribute.
public boolean isBlankAccepted(MBeanAttributeInfo attribute)
attribute - the attribute.
public boolean isEmptyAccepted(MBeanAttributeInfo attribute)
attribute - the attribute.
public boolean isLocal(MBeanAttributeInfo attribute)
attribute - the attribute.
public Comparator getComparator(MBeanAttributeInfo attribute)
attribute - the attribute.
public boolean isArray(MBeanAttributeInfo attribute)
attribute - the attribute.
public boolean isEnumerated(MBeanAttributeInfo attribute)
attribute - the attribute.
public Number getMin(MBeanAttributeInfo attribute)
attribute - the attribute.
public String getPattern(MBeanAttributeInfo attribute)
attribute - the attribute.
public Number getMax(MBeanAttributeInfo attribute)
attribute - the attribute.
public boolean hasConverter(MBeanAttributeInfo attribute)
attribute - the attribute.
public boolean exportTo(Variable variable,
Object target)
variable - the variable.target - the target object.
public boolean exportTo(Variable variable,
Object target,
AttributeFilter filter)
variable - the variable.target - the target object.filter - the filter to apply.
public boolean importFrom(Variable variable,
Object source)
variable - the variable.source - the source object.
public boolean importFrom(Variable variable,
Object source,
AttributeFilter filter)
variable - the variable.source - the source object.filter - the filter to apply.
public Locale getLocale()
public void setLocale(Locale locale)
locale - the locale.public Locale getDefaultLocale()
public boolean isLocalizedVariables()
protected Variable createVariable(String type)
throws ConstructionException
type - the variable type.
ConstructionException - if construction fails.
protected String getResourceBundleName(Variable variable,
MBeanAttributeInfo attribute)
variable - the variable.attribute - the attribute.
protected String getResourceBundleName(String baseName)
baseName - the base name.
protected LookupResourceBundle getResourceBundle(Variable variable,
MBeanAttributeInfo attribute)
variable - the variable.attribute - the attribute.
protected LookupResourceBundle getResourceBundle(String baseName)
baseName - the base name.
protected String getResource(Variable variable,
MBeanAttributeInfo attribute,
String key)
variable - the variable.attribute - the attribute.key - the key of the resource.
protected void clearResourceCache()
protected Converter getConverter()
IllegalStateException - if not available.protected VariableRegistry getVariableRegistry()
IllegalStateException - if not available.protected ResourceMap getResourceMap()
protected MBeanServer getMBeanServer()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||