Package javax.management.openmbean

Examples of javax.management.openmbean.OpenDataException


            || !Comparable.class.isAssignableFrom((Class<?>) element)) {
            final String msg =
                "Parameter class " + element + " of " +
                collection.getName() + " does not implement " +
                Comparable.class.getName();
            throw new OpenDataException(msg);
        }
    }
View Full Code Here


        final Object toNonNullOpenValue(Object javaValue)
                throws OpenDataException {
            MXBeanLookup lookup = lookupNotNull(OpenDataException.class);
            ObjectName name = lookup.mxbeanToObjectName(javaValue);
            if (name == null)
                throw new OpenDataException("No name for object: " + javaValue);
            return name;
        }
View Full Code Here

        final Object toNonNullOpenValue(MXBeanLookup lookup, Object value)
                throws OpenDataException {
            lookupNotNull(lookup, OpenDataException.class);
            ObjectName name = lookup.mxbeanToObjectName(value);
            if (name == null)
                throw new OpenDataException("No name for object: " + value);
            return name;
        }
View Full Code Here

                if (comparator != null) {
                    final String msg =
                        "Cannot convert SortedMap with non-null comparator: " +
                        comparator;
                    IllegalArgumentException iae = new IllegalArgumentException(msg);
                    OpenDataException ode = new OpenDataException(msg);
                    ode.initCause(iae);
                    throw ode;
                }
            }
      final TabularType tabularType = (TabularType) getOpenType();
      final TabularData table = new TabularDataSupport(tabularType);
View Full Code Here

                return name;
            wrong = "not an MXBean registered in this MBeanServer";
        }
        String s = (mxbean == null) ?
            "null" : "object of type " + mxbean.getClass().getName();
        throw new OpenDataException(
                "Could not convert " + s + " to an ObjectName: " + wrong);
        // Message will be strange if mxbean is null but it is not
        // supposed to be.
    }
View Full Code Here

    /** Get the converter for the given Java type, creating it if necessary. */
    public static synchronized OpenConverter toConverter(Type objType)
      throws OpenDataException {

        if (inProgress.containsKey(objType)) {
            throw new OpenDataException(
                    "Recursive data structure, including " + typeName(objType));
        }

        OpenConverter conv;

View Full Code Here

                return makeCompositeConverter(objClass);
            }
        } else if (objType instanceof ParameterizedType) {
            return makeParameterizedConverter((ParameterizedType) objType);
        } else
            throw new OpenDataException("Cannot map type: " + objType);
    }
View Full Code Here

                    return makeTabularConverter(objType, sortedMap,
                            actuals[0], actuals[1]);
                }
            }
  }
        throw new OpenDataException("Cannot convert type: " + objType);
    }
View Full Code Here

                            method);
            if (old != null) {
                final String msg =
                    "Class " + c.getName() + " has method name clash: " +
                    old.getName() + ", " + method.getName();
                throw new OpenDataException(msg);
            }
  }

        final int nitems = getterMap.size();

  if (nitems == 0) {
      throw new OpenDataException("Can't map " + c.getName() +
          " to an open data type");
  }

        final Method[] getters = new Method[nitems];
        final String[] itemNames = new String[nitems];
View Full Code Here

    static InvalidObjectException invalidObjectException(Throwable cause) {
        return invalidObjectException(cause.getMessage(), cause);
    }

    static OpenDataException openDataException(String msg, Throwable cause) {
        return EnvHelp.initCause(new OpenDataException(msg), cause);
    }
View Full Code Here

TOP

Related Classes of javax.management.openmbean.OpenDataException

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.