|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.oddjob.jmx.general.MBeanDirectory
public class MBeanDirectory
An implementation of an BeanDirectory
for accessing
MBeanNode
s.
getIdFor(Object)
and getAllByType(Class)
are not
currently supported.
Constructor Summary | |
---|---|
MBeanDirectory(MBeanSession session)
|
Method Summary | ||
---|---|---|
|
getAllByType(Class<T> type)
Get all objects in the directory of the required type. |
|
String |
getIdFor(Object bean)
Find the id for the given component. |
|
Object |
lookup(String path)
Get the value which is either a bean or the property of a bean. |
|
|
lookup(String path,
Class<T> required)
Get a value, as above, but also convert it into to given type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MBeanDirectory(MBeanSession session)
Method Detail |
---|
public Object lookup(String path) throws ArooaPropertyException
BeanDirectory
The path can be either:
lookup
in interface BeanDirectory
ArooaPropertyException
- If property access fails.public <T> T lookup(String path, Class<T> required) throws ArooaPropertyException, ArooaConversionException
BeanDirectory
Conversion in the directory is required when the client code has no access to the converters required, for instance in a nested Oddjob.
lookup
in interface BeanDirectory
T
- The required type.path
- The full pathrequired
- The required type.
ArooaPropertyException
- If property access fails.
ArooaConversionException
- If an object can be found but
it can't be converted into the required type.public String getIdFor(Object bean)
BeanDirectory
getIdFor
in interface BeanDirectory
public <T> Iterable<T> getAllByType(Class<T> type)
BeanDirectory
Why an Iterable not a Collection or Set? It was thought that this would force read only use. Maybe it should be an array...
getAllByType
in interface BeanDirectory
T
- The required type.type
- The type.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |