Example usage for javax.management.modelmbean InvalidTargetObjectTypeException InvalidTargetObjectTypeException

List of usage examples for javax.management.modelmbean InvalidTargetObjectTypeException InvalidTargetObjectTypeException

Introduction

In this page you can find the example usage for javax.management.modelmbean InvalidTargetObjectTypeException InvalidTargetObjectTypeException.

Prototype


public InvalidTargetObjectTypeException(String s) 

Source Link

Document

Constructor from a string.

Usage

From source file:net.lightbody.bmp.proxy.jetty.util.jmx.ModelMBeanImpl.java

public void setManagedResource(Object proxyObject, String type) throws MBeanException,
        RuntimeOperationsException, InstanceNotFoundException, InvalidTargetObjectTypeException {
    if (proxyObject == null) {
        proxyObject = null;//from w  w w.  j  a  v a2  s  . c  om
        return;
    }

    log.debug("setManagedResource");
    if (!"objectreference".equalsIgnoreCase(type))
        throw new InvalidTargetObjectTypeException(type);

    if (_object == null) {
        // first set so define attributes etc.
        _object = proxyObject;

        defineManagedResource();
    } else
        _object = proxyObject;
}