|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.commons.modeler.modules.ModelerSource | +--org.apache.commons.modeler.modules.MbeansSource
This will create mbeans based on a config file. The format is an extended version of MLET. Classloading. We don't support any explicit classloader tag. A ClassLoader is just an mbean ( it can be the standard MLetMBean or a custom one ). XXX add a special attribute to reference the loader mbean, XXX figure out how to deal with private loaders
Field Summary | |
private org.w3c.dom.Document |
document
|
(package private) long |
lastUpdate
|
(package private) static boolean |
loaderLoaded
|
(package private) boolean |
loading
|
private static Log |
log
|
(package private) java.util.List |
mbeans
|
private java.util.HashMap |
object2Node
|
(package private) Registry |
registry
|
(package private) java.lang.String |
type
|
(package private) long |
updateInterval
|
Fields inherited from class org.apache.commons.modeler.modules.ModelerSource |
location, source |
Constructor Summary | |
MbeansSource()
|
Method Summary | |
void |
destroy()
|
void |
execute()
|
java.lang.String |
getLocation()
|
java.util.List |
getMBeans()
Return the list of mbeans created by this source. |
java.lang.Object |
getSource()
|
void |
init()
Call the init method on all mbeans. |
void |
load()
Load the mbeans from the source. |
java.util.List |
loadDescriptors(Registry registry,
java.lang.String location,
java.lang.String type,
java.lang.Object source)
Load data, returns a list of items. |
private void |
processArg(org.w3c.dom.Node mbeanN)
|
private void |
processAttribute(MBeanServer server,
org.w3c.dom.Node descN,
java.lang.String objectName)
|
void |
save()
Store the mbeans. |
void |
setLocation(java.lang.String loc)
|
void |
setRegistry(Registry reg)
|
void |
setSource(java.lang.Object source)
Set the source to be used to load the mbeans |
void |
setType(java.lang.String type)
Used if a single component is loaded |
void |
start()
|
void |
stop()
|
void |
updateField(ObjectName oname,
java.lang.String name,
java.lang.Object value)
Callback from the BaseMBean to notify that an attribute has changed. |
Methods inherited from class org.apache.commons.modeler.modules.ModelerSource |
getInputStream, store |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static Log log
Registry registry
java.lang.String type
boolean loading
java.util.List mbeans
static boolean loaderLoaded
private org.w3c.dom.Document document
private java.util.HashMap object2Node
long lastUpdate
long updateInterval
Constructor Detail |
public MbeansSource()
Method Detail |
public void setRegistry(Registry reg)
public void setLocation(java.lang.String loc)
public void setType(java.lang.String type)
type
- public void setSource(java.lang.Object source)
MbeansSourceMBean
setSource
in interface MbeansSourceMBean
source
- File or URLpublic java.lang.Object getSource()
getSource
in interface MbeansSourceMBean
public java.lang.String getLocation()
public java.util.List getMBeans()
getMBeans
in interface MbeansSourceMBean
public java.util.List loadDescriptors(Registry registry, java.lang.String location, java.lang.String type, java.lang.Object source) throws java.lang.Exception
ModelerSource
loadDescriptors
in class ModelerSource
registry
- location
- type
- source
- Introspected object or some other source
java.lang.Exception
public void start() throws java.lang.Exception
java.lang.Exception
public void stop() throws java.lang.Exception
java.lang.Exception
public void init() throws java.lang.Exception
MbeansSourceMBean
init
in interface MbeansSourceMBean
java.lang.Exception
public void destroy() throws java.lang.Exception
java.lang.Exception
public void load() throws java.lang.Exception
MbeansSourceMBean
load
in interface MbeansSourceMBean
java.lang.Exception
public void execute() throws java.lang.Exception
java.lang.Exception
public void updateField(ObjectName oname, java.lang.String name, java.lang.Object value)
ModelerSource
updateField
in class ModelerSource
oname
- name
- value
- public void save()
save
in interface MbeansSourceMBean
private void processAttribute(MBeanServer server, org.w3c.dom.Node descN, java.lang.String objectName)
private void processArg(org.w3c.dom.Node mbeanN)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |