Package javax.management.openmbean

Examples of javax.management.openmbean.OpenDataException


      else if(type instanceof ArrayMetaType)
         openType = getOpenType(ArrayMetaType.class.cast(type));
      else if(type instanceof EnumMetaType)
         openType = SimpleType.STRING;
      else
         throw new OpenDataException("Unhandled MetaType: "+type);
      return openType;
   }
View Full Code Here


         EnumValue ev = EnumValue.class.cast(mv);
         openValue = ev.getValue();
      }
      else
      {
         throw new OpenDataException("Unhandled MetaValue: "+mv);
      }
      return openValue;
   }
View Full Code Here

       
        for (Message message : messages) {
            try {
                rc.put(new CompositeDataSupport(compositeType, message.getFileds()));
            } catch (Exception e) {
                throw new OpenDataException(e.getMessage());
            }
        }
       
        return rc;
    }
View Full Code Here

                filelds.put(fromKey, ComponentUtils.getComponentName(channel.getSpyComponent()));
                filelds.put(toKey, ComponentUtils.getComponentName(channel.getAlertComponent()));
                rc.put(new CompositeDataSupport(compositeType, filelds));
            } catch (Exception e) {
                e.printStackTrace();
                throw new OpenDataException(e.getMessage());
            }
        }
       
        return rc;
    }
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");

        OpenConverter conv;

        conv = getConverter(objType);
        if (conv != null)
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

            || !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

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.