public class MBeanServerExecutorLocal extends AbstractMBeanServerExecutor implements NotificationListener
ServerDetector
s, to MBeanServerFactory.findMBeanServer(String)
and finally to the PlatformMBeanServer
It also has a special treatment for the so called "JolokiaMBeanServer" which is
always hidden from JSR-160 and provides some extra functionality like JSONMBeans.MBeanServerExecutor.MBeanAction<R>, MBeanServerExecutor.MBeanEachCallback
Constructor and Description |
---|
MBeanServerExecutorLocal()
Constructor with no detectors
|
MBeanServerExecutorLocal(List<ServerDetector> pDetectors)
Constructor with a given list of destectors
|
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Lifecycle method called at the end of life for this object.
|
protected MBeanServerConnection |
getJolokiaMBeanServer()
Override this method if you want to provide a Jolokia private MBeanServer.
|
protected Set<MBeanServerConnection> |
getMBeanServers()
Get all MBeanServers
|
String |
getServersInfo()
Get a string representation of all servers
|
<R extends JmxRequest> |
handleRequest(JsonRequestHandler<R> pRequestHandler,
R pJmxReq)
Handle a single request
|
call, each, handleNotification, hasMBeansListChangedSince, queryNames, registerForMBeanNotifications, unregisterFromMBeanNotifications
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handleNotification
public MBeanServerExecutorLocal(List<ServerDetector> pDetectors)
pDetectors
- list of detectors for the MBeanServers. Must not be null.public MBeanServerExecutorLocal()
public <R extends JmxRequest> Object handleRequest(JsonRequestHandler<R> pRequestHandler, R pJmxReq) throws MBeanException, ReflectionException, AttributeNotFoundException, InstanceNotFoundException, NotChangedException
pRequestHandler
- the handler which can deal with this requestpJmxReq
- the request to executeMBeanException
ReflectionException
AttributeNotFoundException
InstanceNotFoundException
NotChangedException
public void destroy()
public String getServersInfo()
protected Set<MBeanServerConnection> getMBeanServers()
getMBeanServers
in class AbstractMBeanServerExecutor
protected MBeanServerConnection getJolokiaMBeanServer()
getJolokiaMBeanServer
in class AbstractMBeanServerExecutor
Copyright © 2021. All rights reserved.