Package javax.management

Examples of javax.management.InstanceNotFoundException


        Object resource = getResource(instance);

        /* Check if the given MBean is a ClassLoader */
        if (!(resource instanceof ClassLoader))
            throw new InstanceNotFoundException(loaderName.toString() +
                                                " is not a classloader");

        return (ClassLoader) resource;
    }
View Full Code Here


        if (dom.length() == 0) dom = domain;

        // Find the domain subtable
        Map<String,NamedObject> moiTb = domainTb.get(dom);
        if (moiTb == null) {
            throw new InstanceNotFoundException(name.toString());
        }

        // Remove the corresponding element
        if (moiTb.remove(name.getCanonicalKeyPropertyListString()) == null) {
            throw new InstanceNotFoundException(name.toString());
        }

        // We removed it !
        nbElements--;
View Full Code Here

        String[] signature = {"com.sun.jmx.snmp.agent.SnmpMibAgent"};
        try {
            adaptor = (SnmpMibHandler)(server.invoke(name, "addMib", params,
                 signature));
        } catch (InstanceNotFoundException e) {
            throw new InstanceNotFoundException(name.toString());
        } catch (ReflectionException e) {
            throw new ServiceNotFoundException(name.toString());
        } catch (MBeanException e) {
            // Should never occur...
        }
View Full Code Here

  oids.getClass().getName()};
        try {
            adaptor = (SnmpMibHandler)(server.invoke(name, "addMib", params,
                 signature));
        } catch (InstanceNotFoundException e) {
            throw new InstanceNotFoundException(name.toString());
        } catch (ReflectionException e) {
            throw new ServiceNotFoundException(name.toString());
        } catch (MBeanException e) {
            // Should never occur...
        }
View Full Code Here

        String[] signature = {"com.sun.jmx.snmp.agent.SnmpMibAgent", "java.lang.String"};
        try {
            adaptor = (SnmpMibHandler)(server.invoke(name, "addMib", params,
                 signature));
        } catch (InstanceNotFoundException e) {
            throw new InstanceNotFoundException(name.toString());
        } catch (ReflectionException e) {
            throw new ServiceNotFoundException(name.toString());
        } catch (MBeanException e) {
            // Should never occur...
        }
View Full Code Here

        String[] signature = {"com.sun.jmx.snmp.agent.SnmpMibAgent", "java.lang.String", oids.getClass().getName()};
        try {
            adaptor = (SnmpMibHandler)(server.invoke(name, "addMib", params,
                 signature));
        } catch (InstanceNotFoundException e) {
            throw new InstanceNotFoundException(name.toString());
        } catch (ReflectionException e) {
            throw new ServiceNotFoundException(name.toString());
        } catch (MBeanException e) {
            // Should never occur...
        }
View Full Code Here

       
        checkState();
       
        if (name != null && !name.isPattern()) {
            if (!mbeanServer.isRegistered(name)) {
                throw new InstanceNotFoundException("The MBean " + name +
                    " is not registered.");
            }
        }
       
        synchronized (listenerMap) {
View Full Code Here

    public synchronized void removeNotification(Integer id) throws InstanceNotFoundException {

        // Check that the notification to remove is effectively in the timer table.
        //
        if (timerTable.containsKey(id) == false) {
            throw new InstanceNotFoundException("Timer notification to remove not in the list of notifications");
        }

        // Stop the TimerAlarmClock.
        //
        Object[] obj = (Object[])timerTable.get(id);
View Full Code Here

    public synchronized void removeNotifications(String type) throws InstanceNotFoundException {

        Vector<Integer> v = getNotificationIDs(type);

        if (v.isEmpty())
            throw new InstanceNotFoundException("Timer notifications to remove not in the list of notifications");

        for (Integer i : v)
            removeNotification(i);
    }
View Full Code Here

    }

    public AbstractName toAbstractName(ObjectName objectName) throws InstanceNotFoundException{
        AbstractName abstractName = getAbstractNameFor(objectName);
        if (abstractName == null) {
            throw new InstanceNotFoundException(objectName.getCanonicalName());
        }
        return abstractName;
    }
View Full Code Here

TOP

Related Classes of javax.management.InstanceNotFoundException

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.