Package javax.management

Examples of javax.management.ServiceNotFoundException


     */
    public void setSnmpAdaptorName(ObjectName name, String contextName)
        throws InstanceNotFoundException, ServiceNotFoundException {

        if (server == null) {
            throw new ServiceNotFoundException(mibName + " is not registered in the MBean server");
        }

        // First remove the reference on the old adaptor server.
        //
        if (adaptor != null) {
            adaptor.removeMib(this, contextName);
        }

        // Then update the reference to the new adaptor server.
        //
        Object[] params = {this, contextName};
        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...
        }

        adaptorName = name;
View Full Code Here


    public void setSnmpAdaptorName(ObjectName name,
                                   String contextName, SnmpOid[] oids)
        throws InstanceNotFoundException, ServiceNotFoundException {

        if (server == null) {
            throw new ServiceNotFoundException(mibName + " is not registered in the MBean server");
        }

        // First remove the reference on the old adaptor server.
        //
        if (adaptor != null) {
            adaptor.removeMib(this, contextName);
        }

        // Then update the reference to the new adaptor server.
        //
        Object[] params = {this, contextName, oids};
        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...
        }

        adaptorName = name;
View Full Code Here

            // Acquire the ModelMBeanOperationInfo information for
            // the requested operation
            ModelMBeanOperationInfo opInfo = info.getOperation(name);
            if (opInfo == null)
                throw new MBeanException
                    (new ServiceNotFoundException("Cannot find operation " + name),
                     "Cannot find operation " + name);

            // Prepare the signature required by Java reflection APIs
            // FIXME - should we use the signature from opInfo?
            Class types[] = new Class[signature.length];
View Full Code Here

            // Acquire the ModelMBeanOperationInfo information for
            // the requested operation
            OperationInfo opInfo = operations.get(aname);
            if (opInfo == null)
                throw new MBeanException(new ServiceNotFoundException(
                        "Cannot find operation " + aname),
                        "Cannot find operation " + aname);

            // Prepare the signature required by Java reflection APIs
            // FIXME - should we use the signature from opInfo?
View Full Code Here

        // Acquire the ModelMBeanOperationInfo information for
        // the requested operation
        OperationInfo opInfo =
                operations.get(createOperationKey(aname, signature));
        if (opInfo == null)
            throw new MBeanException(new ServiceNotFoundException(
                    "Cannot find operation " + aname),
                    "Cannot find operation " + aname);

        // Prepare the signature required by Java reflection APIs
        // FIXME - should we use the signature from opInfo?
View Full Code Here

            // Acquire the ModelMBeanOperationInfo information for
            // the requested operation
            OperationInfo opInfo = operations.get(aname);
            if (opInfo == null)
                throw new MBeanException(new ServiceNotFoundException(
                        "Cannot find operation " + aname),
                        "Cannot find operation " + aname);

            // Prepare the signature required by Java reflection APIs
            // FIXME - should we use the signature from opInfo?
View Full Code Here

         }
      }

      if (opInfo == null) {
         final String msg = "Operation " + name + " not amongst operations in " + opInfos;
         throw new MBeanException(new ServiceNotFoundException(msg), msg);
      }

      // Argument type transformation according to signatures
      for (int i = 0; i < sig.length; i++) {
         // arguments are taken from RHQ like java.lang.String but we need some fields to be numbers
View Full Code Here

      // will be echoed back by the service. This property enables matching
      // the reply with the right endpoint object managed by the aggregate.
       tm.setStringProperty(AsynchAEMessage.EndpointServer, anEndpoint.getServerURI());

      if (endpointConnection.send(tm, 0, true) != true) {
        throw new ServiceNotFoundException();
      }

    } catch (AsynchAEException e) {
      throw e;
    } catch (Exception e) {
View Full Code Here

            // Acquire the ModelMBeanOperationInfo information for
            // the requested operation
            OperationInfo opInfo = (OperationInfo)operations.get(aname);
            if (opInfo == null)
                throw new MBeanException(new ServiceNotFoundException(
                        "Cannot find operation " + aname),
                        "Cannot find operation " + aname);

            // Prepare the signature required by Java reflection APIs
            // FIXME - should we use the signature from opInfo?
View Full Code Here

            // Acquire the ModelMBeanOperationInfo information for
            // the requested operation
            OperationInfo opInfo = operations.get(aname);
            if (opInfo == null)
                throw new MBeanException(new ServiceNotFoundException(
                        "Cannot find operation " + aname),
                        "Cannot find operation " + aname);

            // Prepare the signature required by Java reflection APIs
            // FIXME - should we use the signature from opInfo?
View Full Code Here

TOP

Related Classes of javax.management.ServiceNotFoundException

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.