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