Package io.hawt.system
Class RBACMBeanInvoker
- java.lang.Object
-
- io.hawt.system.RBACMBeanInvoker
-
public class RBACMBeanInvoker extends Object
Cached MBean server invoker forRBACRestrictor.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classRBACMBeanInvoker.CanInvokeKey
-
Field Summary
Fields Modifier and Type Field Description protected com.google.common.cache.LoadingCache<RBACMBeanInvoker.CanInvokeKey,Boolean>canInvokeCacheprotected com.google.common.cache.LoadingCache<ObjectName,Map<String,MBeanAttributeInfo>>mbeanInfoCacheprotected MBeanServermBeanServerprotected ObjectNamesecurityMBean
-
Constructor Summary
Constructors Constructor Description RBACMBeanInvoker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanInvoke(ObjectName objectName, String operation)protected booleandoCanInvoke(ObjectName objectName, String operation)protected voidinitCaches()protected voidinitSecurityMBean()booleanisReadAllowed(ObjectName objectName, String attribute)booleanisWriteAllowed(ObjectName objectName, String attribute)protected Map<String,MBeanAttributeInfo>loadMBeanAttributes(ObjectName objectName)
-
-
-
Field Detail
-
mBeanServer
protected MBeanServer mBeanServer
-
securityMBean
protected ObjectName securityMBean
-
canInvokeCache
protected com.google.common.cache.LoadingCache<RBACMBeanInvoker.CanInvokeKey,Boolean> canInvokeCache
-
mbeanInfoCache
protected com.google.common.cache.LoadingCache<ObjectName,Map<String,MBeanAttributeInfo>> mbeanInfoCache
-
-
Method Detail
-
initSecurityMBean
protected void initSecurityMBean()
-
initCaches
protected void initCaches()
-
doCanInvoke
protected boolean doCanInvoke(ObjectName objectName, String operation) throws Exception
- Throws:
Exception
-
loadMBeanAttributes
protected Map<String,MBeanAttributeInfo> loadMBeanAttributes(ObjectName objectName) throws Exception
- Throws:
Exception
-
canInvoke
public boolean canInvoke(ObjectName objectName, String operation)
-
isReadAllowed
public boolean isReadAllowed(ObjectName objectName, String attribute)
-
isWriteAllowed
public boolean isWriteAllowed(ObjectName objectName, String attribute)
-
-