Package javax.management

Examples of javax.management.RuntimeOperationsException


      MBeanMetaData metadata = findMBeanMetaData(observed);
      Object mbean = metadata.mbean;

      if (!(mbean instanceof NotificationEmitter))
      {
         throw new RuntimeOperationsException(new IllegalArgumentException("MBean " + observed + " is not a NotificationEmitter"));
      }

      removeNotificationListenerImpl(metadata, listener, filter, handback);
   }
View Full Code Here


   public Object instantiate(String className, Object[] args, String[] parameters)
           throws ReflectionException, MBeanException
   {
      if (className == null || className.trim().length() == 0)
      {
         throw new RuntimeOperationsException(new IllegalArgumentException("Class name cannot be null or empty"));
      }

      try
      {
         Class cls = getModifiableClassLoaderRepository().loadClass(className);
View Full Code Here

   public Object instantiate(String className, ObjectName loaderName, Object[] args, String[] parameters)
           throws ReflectionException, MBeanException, InstanceNotFoundException
   {
      if (className == null || className.trim().length() == 0)
      {
         throw new RuntimeOperationsException(new IllegalArgumentException("Class name cannot be null or empty"));
      }

      // loaderName can be null: means using this class' ClassLoader

      loaderName = secureObjectName(loaderName);
      if (loaderName != null && loaderName.isPattern())
      {
         throw new RuntimeOperationsException(new IllegalArgumentException("ObjectName for the ClassLoader cannot be a pattern ObjectName: " + loaderName));
      }

      ClassLoader cl = getClassLoaderImpl(loaderName);
      return instantiateImpl(className, cl, null, parameters, args).mbean;
   }
View Full Code Here

   private ObjectInstance registerMBeanImpl(Object mbean, ObjectName objectName, boolean privileged)
           throws InstanceAlreadyExistsException, MBeanRegistrationException, NotCompliantMBeanException
   {
      if (mbean == null)
      {
         throw new RuntimeOperationsException(new IllegalArgumentException("MBean instance cannot be null"));
      }

      MBeanMetaData metadata = createMBeanMetaData();
      metadata.mbean = mbean;
      metadata.classloader = mbean.getClass().getClassLoader();
View Full Code Here

      metadata.name = normalizeObjectName(metadata.name);

      ObjectName objectName = metadata.name;
      if (objectName == null || objectName.isPattern())
      {
         throw new RuntimeOperationsException(new IllegalArgumentException("ObjectName cannot be null or a pattern ObjectName"));
      }
      if (objectName.getDomain().equals("JMImplementation") && !privileged)
      {
    throw new JMRuntimeException("Domain 'JMImplementation' is reserved for the JMX Agent");
      }
View Full Code Here

   {
      objectName = secureObjectName(objectName);

      if (objectName == null || objectName.isPattern())
      {
         throw new RuntimeOperationsException(new IllegalArgumentException("ObjectName cannot be null or a pattern ObjectName"));
      }

      if (objectName.getDomain().equals("JMImplementation"))
      {
         throw new RuntimeOperationsException(new IllegalArgumentException("Domain 'JMImplementation' is reserved for the JMX Agent"));
      }

      MBeanMetaData metadata = findMBeanMetaData(objectName);

      try
View Full Code Here

   public Object getAttribute(ObjectName objectName, String attribute)
           throws InstanceNotFoundException, MBeanException, AttributeNotFoundException, ReflectionException
   {
      if (attribute == null || attribute.trim().length() == 0)
      {
         throw new RuntimeOperationsException(new IllegalArgumentException("Invalid attribute"));
      }

      objectName = secureObjectName(objectName);

      MBeanMetaData metadata = findMBeanMetaData(objectName);
View Full Code Here

   public void setAttribute(ObjectName objectName, Attribute attribute)
           throws InstanceNotFoundException, AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
   {
      if (attribute == null || attribute.getName().trim().length() == 0)
      {
         throw new RuntimeOperationsException(new IllegalArgumentException("Invalid attribute"));
      }

      objectName = secureObjectName(objectName);

      MBeanMetaData metadata = findMBeanMetaData(objectName);
View Full Code Here

   public AttributeList getAttributes(ObjectName objectName, String[] attributes)
           throws InstanceNotFoundException, ReflectionException
   {
      if (attributes == null || attributes.length == 0)
      {
         throw new RuntimeOperationsException(new IllegalArgumentException("Invalid attribute list"));
      }

      objectName = secureObjectName(objectName);

      MBeanMetaData metadata = findMBeanMetaData(objectName);
View Full Code Here

   public AttributeList setAttributes(ObjectName objectName, AttributeList attributes)
           throws InstanceNotFoundException, ReflectionException
   {
      if (attributes == null)
      {
         throw new RuntimeOperationsException(new IllegalArgumentException("Invalid attribute list"));
      }

      objectName = secureObjectName(objectName);

      MBeanMetaData metadata = findMBeanMetaData(objectName);
View Full Code Here

TOP

Related Classes of javax.management.RuntimeOperationsException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.