Codota Logo
JMXResource.root
Code IndexAdd Codota to your IDE (free)

How to use
root
method
in
org.apache.cassandra.auth.JMXResource

Best Java code snippets using org.apache.cassandra.auth.JMXResource.root (Showing top 20 results out of 315)

  • Common ways to obtain JMXResource
private void myMethod () {
JMXResource j =
  • Codota IconJMXResource.root()
  • Codota IconString name;new JMXResource(name)
  • Codota IconCql.Parser parser;parser.jmxResource()
  • Smart code suggestions by Codota
}
origin: org.apache.cassandra/cassandra-all

@Override
public IResource getParent()
{
  if (level == Level.MBEAN)
    return root();
  throw new IllegalStateException("Root-level resource can't have a parent");
}
origin: jsevellec/cassandra-unit

@Override
public IResource getParent()
{
  if (level == Level.MBEAN)
    return root();
  throw new IllegalStateException("Root-level resource can't have a parent");
}
origin: com.strapdata.cassandra/cassandra-all

@Override
public IResource getParent()
{
  if (level == Level.MBEAN)
    return root();
  throw new IllegalStateException("Root-level resource can't have a parent");
}
origin: jsevellec/cassandra-unit

/**
 * Parses a role resource name into a RoleResource instance.
 *
 * @param name Name of the data resource.
 * @return RoleResource instance matching the name.
 */
public static JMXResource fromName(String name)
{
  String[] parts = StringUtils.split(name, '/');
  if (!parts[0].equals(ROOT_NAME) || parts.length > 2)
    throw new IllegalArgumentException(String.format("%s is not a valid JMX resource name", name));
  if (parts.length == 1)
    return root();
  return mbean(parts[1]);
}
origin: com.strapdata.cassandra/cassandra-all

/**
 * Parses a role resource name into a RoleResource instance.
 *
 * @param name Name of the data resource.
 * @return RoleResource instance matching the name.
 */
public static JMXResource fromName(String name)
{
  String[] parts = StringUtils.split(name, '/');
  if (!parts[0].equals(ROOT_NAME) || parts.length > 2)
    throw new IllegalArgumentException(String.format("%s is not a valid JMX resource name", name));
  if (parts.length == 1)
    return root();
  return mbean(parts[1]);
}
origin: org.apache.cassandra/cassandra-all

/**
 * Parses a role resource name into a RoleResource instance.
 *
 * @param name Name of the data resource.
 * @return RoleResource instance matching the name.
 */
public static JMXResource fromName(String name)
{
  String[] parts = StringUtils.split(name, '/');
  if (!parts[0].equals(ROOT_NAME) || parts.length > 2)
    throw new IllegalArgumentException(String.format("%s is not a valid JMX resource name", name));
  if (parts.length == 1)
    return root();
  return mbean(parts[1]);
}
origin: org.apache.cassandra/cassandra-all

/**
 * Authorize execution of a method on the MBeanServer which does not take an MBean ObjectName
 * as its first argument. The whitelisted methods that match this criteria are generally
 * descriptive methods concerned with the MBeanServer itself, rather than with any particular
 * set of MBeans managed by the server and so we check the DESCRIBE permission on the root
 * JMXResource (representing the MBeanServer)
 *
 * @param subject
 * @param methodName
 * @return the result of the method invocation, if authorized
 * @throws Throwable
 * @throws SecurityException if authorization fails
 */
private boolean authorizeMBeanServerMethod(RoleResource subject, String methodName)
{
  logger.trace("JMX invocation of {} on MBeanServer requires permission {}", methodName, Permission.DESCRIBE);
  return (MBEAN_SERVER_METHOD_WHITELIST.contains(methodName) &&
    hasPermission(subject, Permission.DESCRIBE, JMXResource.root()));
}
origin: jsevellec/cassandra-unit

/**
 * Authorize execution of a method on the MBeanServer which does not take an MBean ObjectName
 * as its first argument. The whitelisted methods that match this criteria are generally
 * descriptive methods concerned with the MBeanServer itself, rather than with any particular
 * set of MBeans managed by the server and so we check the DESCRIBE permission on the root
 * JMXResource (representing the MBeanServer)
 *
 * @param subject
 * @param methodName
 * @return the result of the method invocation, if authorized
 * @throws Throwable
 * @throws SecurityException if authorization fails
 */
private boolean authorizeMBeanServerMethod(RoleResource subject, String methodName)
{
  logger.trace("JMX invocation of {} on MBeanServer requires permission {}", methodName, Permission.DESCRIBE);
  return (MBEAN_SERVER_METHOD_WHITELIST.contains(methodName) &&
    hasPermission(subject, Permission.DESCRIBE, JMXResource.root()));
}
origin: com.strapdata.cassandra/cassandra-all

/**
 * Authorize execution of a method on the MBeanServer which does not take an MBean ObjectName
 * as its first argument. The whitelisted methods that match this criteria are generally
 * descriptive methods concerned with the MBeanServer itself, rather than with any particular
 * set of MBeans managed by the server and so we check the DESCRIBE permission on the root
 * JMXResource (representing the MBeanServer)
 *
 * @param subject
 * @param methodName
 * @return the result of the method invocation, if authorized
 * @throws Throwable
 * @throws SecurityException if authorization fails
 */
private boolean authorizeMBeanServerMethod(RoleResource subject, String methodName)
{
  logger.trace("JMX invocation of {} on MBeanServer requires permission {}", methodName, Permission.DESCRIBE);
  return (MBEAN_SERVER_METHOD_WHITELIST.contains(methodName) &&
    hasPermission(subject, Permission.DESCRIBE, JMXResource.root()));
}
origin: com.strapdata.cassandra/cassandra-all

if (permittedResources.contains(JMXResource.root()))
  return true;
origin: org.apache.cassandra/cassandra-all

if (permittedResources.contains(JMXResource.root()))
  return true;
origin: jsevellec/cassandra-unit

if (permittedResources.contains(JMXResource.root()))
  return true;
origin: org.apache.cassandra/cassandra-all

if (permittedResources.contains(JMXResource.root()))
  return true;
origin: jsevellec/cassandra-unit

if (permittedResources.contains(JMXResource.root()))
  return true;
origin: com.strapdata.cassandra/cassandra-all

if (permittedResources.contains(JMXResource.root()))
  return true;
origin: org.apache.cassandra/cassandra-all

/**
 * Creates an IResource instance from its external name.
 * Resource implementation class is inferred by matching against the known IResource
 * impls' root level resources.
 * @param name
 * @return an IResource instance created from the name
 */
public static IResource fromName(String name)
{
  if (name.startsWith(RoleResource.root().getName()))
    return RoleResource.fromName(name);
  else if (name.startsWith(DataResource.root().getName()))
    return DataResource.fromName(name);
  else if (name.startsWith(FunctionResource.root().getName()))
    return FunctionResource.fromName(name);
  else if (name.startsWith(JMXResource.root().getName()))
    return JMXResource.fromName(name);
  else
    throw new IllegalArgumentException(String.format("Name %s is not valid for any resource type", name));
}
origin: com.strapdata.cassandra/cassandra-all

/**
 * Creates an IResource instance from its external name.
 * Resource implementation class is inferred by matching against the known IResource
 * impls' root level resources.
 * @param name
 * @return an IResource instance created from the name
 */
public static IResource fromName(String name)
{
  if (name.startsWith(RoleResource.root().getName()))
    return RoleResource.fromName(name);
  else if (name.startsWith(DataResource.root().getName()))
    return DataResource.fromName(name);
  else if (name.startsWith(FunctionResource.root().getName()))
    return FunctionResource.fromName(name);
  else if (name.startsWith(JMXResource.root().getName()))
    return JMXResource.fromName(name);
  else
    throw new IllegalArgumentException(String.format("Name %s is not valid for any resource type", name));
}
origin: jsevellec/cassandra-unit

/**
 * Creates an IResource instance from its external name.
 * Resource implementation class is inferred by matching against the known IResource
 * impls' root level resources.
 * @param name
 * @return an IResource instance created from the name
 */
public static IResource fromName(String name)
{
  if (name.startsWith(RoleResource.root().getName()))
    return RoleResource.fromName(name);
  else if (name.startsWith(DataResource.root().getName()))
    return DataResource.fromName(name);
  else if (name.startsWith(FunctionResource.root().getName()))
    return FunctionResource.fromName(name);
  else if (name.startsWith(JMXResource.root().getName()))
    return JMXResource.fromName(name);
  else
    throw new IllegalArgumentException(String.format("Name %s is not valid for any resource type", name));
}
origin: org.apache.cassandra/cassandra-all

res = JMXResource.root(); 
origin: jsevellec/cassandra-unit

res = JMXResource.root(); 
org.apache.cassandra.authJMXResourceroot

Popular methods of JMXResource

  • <init>
  • fromName
    Parses a role resource name into a RoleResource instance.
  • getName
  • getObjectName
  • hasParent
  • mbean

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (Timer)
  • requestLocationUpdates (LocationManager)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • HashSet (java.util)
    This class implements the Set interface, backed by a hash table (actually a HashMap instance). It m
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • DataSource (javax.sql)
    A factory for connections to the physical data source that this DataSource object represents. An alt
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now