Class AbstractWrapper
- java.lang.Object
-
- org.opennms.netmgt.poller.jmx.wrappers.AbstractWrapper
-
- Direct Known Subclasses:
CompositeDataWrapper
,ObjectNameWrapper
,TabularDataWrapper
public abstract class AbstractWrapper extends Object
Base class for all wrappers used to evaluate MBean attributes in JEXL expressions.
-
-
Field Summary
Fields Modifier and Type Field Description protected MBeanServerConnection
connection
The connection to the MBean server.
-
Constructor Summary
Constructors Constructor Description AbstractWrapper(MBeanServerConnection connection)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Object
get(String name)
Get the value of the requested attribute.protected Object
wrap(Object result)
Helper to wrap an arbitary result in a wrapper if required.
-
-
-
Field Detail
-
connection
protected final MBeanServerConnection connection
The connection to the MBean server.
-
-
Constructor Detail
-
AbstractWrapper
public AbstractWrapper(MBeanServerConnection connection)
-
-
Method Detail
-
get
public abstract Object get(String name)
Get the value of the requested attribute. Implementors should wrap the result using thewrap(Object)
method.- Parameters:
name
- the name of the requested attribute- Returns:
- the value
-
-