public interface MBeanServerExecutor
MBeanServerConnection
s, e.g. for implementing it with JSR-160 connections.
A MBeanServerExecutor
is usedModifier and Type | Interface and Description |
---|---|
static interface |
MBeanServerExecutor.MBeanAction<R>
A MBeanAction represent a single action on a MBeanServer for a given object name.
|
static interface |
MBeanServerExecutor.MBeanEachCallback
This callback is used together with
each(ObjectName, MBeanEachCallback) for iterating over all
active MBeanServers. |
Modifier and Type | Method and Description |
---|---|
<R> R |
call(ObjectName pObjectName,
MBeanServerExecutor.MBeanAction<R> pMBeanAction,
Object... pExtraArgs)
Call an action an the first MBeanServer on which the action does not throw an InstanceNotFoundException
will considered to be successful and this method returns with the return value of the succesful
action.
|
void |
each(ObjectName pObjectName,
MBeanServerExecutor.MBeanEachCallback pCallback)
Iterate over all MBeanServers managed and call the handler via a callback.
|
boolean |
hasMBeansListChangedSince(long pTimestamp)
Check whether the set of MBeans in all managed MBeanServer has been changed
since the given time.
|
Set<ObjectName> |
queryNames(ObjectName pObjectName)
Query all MBeanServer and return the union of all results
|
void each(ObjectName pObjectName, MBeanServerExecutor.MBeanEachCallback pCallback) throws IOException, ReflectionException, MBeanException
pObjectName
- object name to lookup, which can be a pattern in which case a query is performed.pCallback
- the action to be called for each MBean found on every serverIOException
ReflectionException
MBeanException
<R> R call(ObjectName pObjectName, MBeanServerExecutor.MBeanAction<R> pMBeanAction, Object... pExtraArgs) throws IOException, ReflectionException, MBeanException, AttributeNotFoundException, InstanceNotFoundException
IllegalArgumentException
is raised (containing the last
InstanceNotFoundException
from the last tried server)R
- type of the return valuepObjectName
- objectname given through to the actionpMBeanAction
- the action to callpExtraArgs
- any extra args given also to the actionIOException
ReflectionException
MBeanException
- if the JMX call causes an issueAttributeNotFoundException
InstanceNotFoundException
Set<ObjectName> queryNames(ObjectName pObjectName) throws IOException
pObjectName
- pattern to query for. If null, then all MBean of all MBeanServers are returnedIOException
- if called remotely and an IOError occured.boolean hasMBeansListChangedSince(long pTimestamp)
pTimestamp
- seconds since 1.1.1970Copyright © 2016. All rights reserved.