public class KarafMBeanServerGuard extends Object implements InvocationHandler
| Constructor and Description |
|---|
KarafMBeanServerGuard() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canInvoke(BulkRequestContext context,
MBeanServer mbeanServer,
ObjectName objectName)
Returns whether there is any method that the current user can invoke.
|
boolean |
canInvoke(BulkRequestContext context,
MBeanServer mbeanServer,
ObjectName objectName,
String methodName)
Returns whether there is any overload of the specified method that can be invoked by the current user.
|
boolean |
canInvoke(BulkRequestContext context,
MBeanServer mbeanServer,
ObjectName objectName,
String methodName,
String[] signature)
Returns true if the method on the MBean with the specified signature can be invoked.
|
boolean |
canInvoke(MBeanServer mbeanServer,
ObjectName objectName)
Returns whether there is any method that the current user can invoke.
|
boolean |
canInvoke(MBeanServer mbeanServer,
ObjectName objectName,
String methodName)
Returns whether there is any overload of the specified method that can be invoked by the current user.
|
boolean |
canInvoke(MBeanServer mbeanServer,
ObjectName objectName,
String methodName,
String[] signature)
Returns true if the method on the MBean with the specified signature can be invoked.
|
org.osgi.service.cm.ConfigurationAdmin |
getConfigAdmin() |
Object |
invoke(Object proxy,
Method method,
Object[] args) |
void |
setConfigAdmin(org.osgi.service.cm.ConfigurationAdmin configAdmin) |
public org.osgi.service.cm.ConfigurationAdmin getConfigAdmin()
public void setConfigAdmin(org.osgi.service.cm.ConfigurationAdmin configAdmin)
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke in interface InvocationHandlerThrowablepublic boolean canInvoke(MBeanServer mbeanServer, ObjectName objectName) throws JMException, IOException
mbeanServer - the MBeanServer where the object is registered.objectName - the ObjectName to check.true if there is a method on the object that can be invoked, false else.JMExceptionIOExceptionpublic boolean canInvoke(BulkRequestContext context, MBeanServer mbeanServer, ObjectName objectName) throws JMException, IOException
context - BulkRequestContext for optimized ConfigAdmin access, may be nullmbeanServer - the MBeanServer where the object is registered.objectName - the ObjectName to check.true if there is a method on the object that can be invoked, false else.JMExceptionIOExceptionpublic boolean canInvoke(MBeanServer mbeanServer, ObjectName objectName, String methodName) throws JMException, IOException
mbeanServer - the MBeanServer where the object is registered.objectName - the MBean ObjectName.methodName - the name of the method.true if there is an overload of the method that can be invoked by the current user.JMExceptionIOExceptionpublic boolean canInvoke(BulkRequestContext context, MBeanServer mbeanServer, ObjectName objectName, String methodName) throws JMException, IOException
context - BulkRequestContext for optimized ConfigAdmin access, may be nullmbeanServer - the MBeanServer where the object is registered.objectName - the MBean ObjectName.methodName - the name of the method.true if there is an overload of the method that can be invoked by the current user.JMExceptionIOExceptionpublic boolean canInvoke(MBeanServer mbeanServer, ObjectName objectName, String methodName, String[] signature) throws IOException
mbeanServer - the MBeanServer where the object is registered.objectName - the MBean ObjectName.methodName - the name of the method.signature - the signature of the method.true if the method can be invoked, false else. Note that if a method name or signature
is provided that does not exist on the MBean, the behaviour of this method is undefined. In other words,
if you ask whether a method that does not exist can be invoked, the method may return true but
actually invoking that method will obviously not work.IOExceptionpublic boolean canInvoke(BulkRequestContext context, MBeanServer mbeanServer, ObjectName objectName, String methodName, String[] signature) throws IOException
context - BulkRequestContext for optimized ConfigAdmin access, may be nullmbeanServer - the MBeanServer where the object is registered.objectName - the MBean ObjectName.methodName - the name of the method.signature - the signature of the method.true if the method can be invoked, false else. Note that if a method name or signature
is provided that does not exist on the MBean, the behaviour of this method is undefined. In other words,
if you ask whether a method that does not exist can be invoked, the method may return true but
actually invoking that method will obviously not work.IOExceptionCopyright © 2007–2017 The Apache Software Foundation. All rights reserved.