[Java] Class JmxBuilderModelMBean
- groovy.jmx.builder.JmxBuilderModelMBean
- All Implemented Interfaces and Traits:
- NotificationListener
public class JmxBuilderModelMBean extends RequiredModelMBean implements NotificationListener
The JmxBuilderModelMBean is the MBean class that proxies exported POGO/POJO inside the MBeanServer. When JmxBuilder exports an object instance, an instance of this class is created and exported inside the MBeanServer.
Constructor Summary
Constructor and description |
---|
JmxBuilderModelMBean
(Object objectRef) |
JmxBuilderModelMBean
() |
JmxBuilderModelMBean
(ModelMBeanInfo mbi) |
Methods Summary
Type Params | Return Type | Name and description |
---|---|---|
public void |
addEventListeners(MBeanServer server, Map<String, Map<String, Object>> descriptor) Sets up event listeners for this MBean as described in the descriptor. | |
public void |
addOperationCallListeners(Map<String, Map<String, Map<String, Object>>> descriptor) Registers listeners for operation calls (i.e. method, getter, and setter calls) when invoked on this bean from the MBeanServer. | |
public void |
handleNotification(Notification note, Object handback) | |
public Object |
invoke(String opName, Object[] opArgs, String[] signature) | |
public void |
setManagedResource(Object obj) |
Inherited Methods Summary
Constructor Detail
public JmxBuilderModelMBean(Object objectRef)
public JmxBuilderModelMBean()
public JmxBuilderModelMBean(ModelMBeanInfo mbi)
Method Detail
public void addEventListeners(MBeanServer server, Map<String, Map<String, Object>> descriptor)
Sets up event listeners for this MBean as described in the descriptor. The descriptor contains a map with layout {item -> Map[event:"...", from:ObjectName, callback:&Closure],...,}
- Parameters:
-
server
- the MBeanServer is to be registered. -
descriptor
- a map containing info about the event
public void addOperationCallListeners(Map<String, Map<String, Map<String, Object>>> descriptor)
Registers listeners for operation calls (i.e. method, getter, and setter calls) when invoked on this bean from the MBeanServer. Descriptor should contain a map with layout item -> [Map[methodListener:[target:"", tpe:"", callback:&Closure], ... ,]]
- Parameters:
-
descriptor
- MetaMap descriptor containing description of operation call listeners
public void handleNotification(Notification note, Object handback)
@Override public Object invoke(String opName, Object[] opArgs, String[] signature)
public void setManagedResource(Object obj)
© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/3.0.7/html/gapi/groovy/jmx/builder/JmxBuilderModelMBean.html