All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.hawt.osgi.jmx.RBACDecoratorMBean Maven / Gradle / Ivy

There is a newer version: 2.17.7
Show newest version
/**
 *  Copyright 2005-2016 Red Hat, Inc.
 *
 *  Red Hat licenses this file to you under the Apache License, version
 *  2.0 (the "License"); you may not use this file except in compliance
 *  with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
 *  implied.  See the License for the specific language governing
 *  permissions and limitations under the License.
 */
package io.hawt.osgi.jmx;

import java.util.Map;

/**
 * 

MBean that optimizes access to Karaf's RBAC services.

*

When doing client-side initialization, hawtio invokes two time-consuming operations:

    *
  • LIST of available MBeans (with metadata consisting in attrs, ops, description
  • *
  • EXEC for org.apache.karaf.management.JMXSecurityMBean#canInvoke(java.util.Map)
  • *
* This becomes unacceptable when we have hundreds of similar MBeans (like ActiveMQ queues or Camel * components/endpoints/processors/routes/consumers/...

*

The role of this MBean is to combine LIST+EXEC/RBAC operations into one - and return * map that is complete, but optimized (uses shared JSON elements that can be processed by hawtio client * app itself).

*/ public interface RBACDecoratorMBean { /** * Decorates {@link Map} (that can be nicely handled by Jolokia) containing everything that is initially * needed by hawtio client application. It's an optimized and dedicated method that runs much faster than * sequence of relevant Jolokia operations (LIST+EXEC with maxDepth=7). * @return */ void decorate(Map map) throws Exception; /** * Returns if it is in verify mode. When it runs in verify mode, consistency of RBAC information is * checked upon decorate. * @return verify mode */ boolean getVerify(); /** * Sets verify mode. * @param verify verify mode to set */ void setVerify(boolean verify); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy