Package javax.management

Examples of javax.management.RuntimeOperationsException


   * <code>category<code>, is returned. This requires the prototype Logger class to have a public parameterless
   * constructor.
   */
  public static Logger getLogger(String category)
  {
    if (category == null) {throw new RuntimeOperationsException(new IllegalArgumentException("Category cannot be null"));}

    synchronized (m_loggerCache)
    {
      Logger logger = (Logger)m_loggerCache.get(category);
      if (logger == null)
View Full Code Here


   * Use a null delegate to remove redirection for the specified category.
   * @see #getLogger
   */
  public static void redirectTo(Logger prototype, String category)
  {
    if (category == null) {throw new RuntimeOperationsException(new IllegalArgumentException("Category cannot be null"));}

    if (prototype == null)
    {
      // Remove the redirection
      synchronized (m_prototypeMap)
View Full Code Here

   public ObjectInputStream deserialize(String className, ObjectName loaderName, byte[] bytes)
           throws InstanceNotFoundException, OperationsException, ReflectionException
   {
      if (className == null || className.trim().length() == 0)
      {
         throw new RuntimeOperationsException(new IllegalArgumentException("Invalid class name '" + className + "'"));
      }

      ClassLoader cl = getClassLoader(loaderName);

      try
View Full Code Here

   public ObjectInputStream deserialize(String className, byte[] bytes)
           throws OperationsException, ReflectionException
   {
      if (className == null || className.trim().length() == 0)
      {
         throw new RuntimeOperationsException(new IllegalArgumentException("Invalid class name '" + className + "'"));
      }

      // Find the classloader that can load the given className using the ClassLoaderRepository
      try
      {
View Full Code Here

    */
   private ObjectInputStream deserializeImpl(ClassLoader classloader, byte[] bytes) throws OperationsException
   {
      if (bytes == null || bytes.length == 0)
      {
         throw new RuntimeOperationsException(new IllegalArgumentException("Invalid byte array " + bytes));
      }

      ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
      try
      {
View Full Code Here

      listener = secureObjectName(listener);

      Object mbean = findMBeanMetaData(listener).mbean;
      if (!(mbean instanceof NotificationListener))
      {
         throw new RuntimeOperationsException(new IllegalArgumentException("MBean " + listener + " is not a NotificationListener"));
      }
      addNotificationListener(observed, (NotificationListener)mbean, filter, handback);
   }
View Full Code Here

   public void addNotificationListener(ObjectName observed, NotificationListener listener, NotificationFilter filter, Object handback)
           throws InstanceNotFoundException
   {
      if (listener == null)
      {
         throw new RuntimeOperationsException(new IllegalArgumentException("NotificationListener cannot be null"));
      }

      observed = secureObjectName(observed);

      MBeanMetaData metadata = findMBeanMetaData(observed);

      Object mbean = metadata.mbean;

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

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

      listener = secureObjectName(listener);

      Object mbean = findMBeanMetaData(listener).mbean;
      if (!(mbean instanceof NotificationListener))
      {
         throw new RuntimeOperationsException(new IllegalArgumentException("MBean " + listener + " is not a NotificationListener"));
      }
      removeNotificationListener(observed, (NotificationListener)mbean);
   }
View Full Code Here

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

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

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

      listener = secureObjectName(listener);

      Object mbean = findMBeanMetaData(listener).mbean;
      if (!(mbean instanceof NotificationListener))
      {
         throw new RuntimeOperationsException(new IllegalArgumentException("MBean " + listener + " is not a NotificationListener"));
      }
      removeNotificationListener(observed, (NotificationListener)mbean, filter, handback);
   }
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.