Package javax.management

Examples of javax.management.ServiceNotFoundException


     */
    public void setSnmpAdaptorName(ObjectName name, 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);
        }       
       
        // Then update the reference to the new adaptor server.
        //
        Object[] params = {this, oids};
        String[] signature = {"com.sun.jmx.snmp.agent.SnmpMibAgent",
  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


     */
    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

       URL ur = new URL(url);
       if (!Arrays.asList(getURLs()).contains(ur))
     super.addURL(ur);
   } catch (MalformedURLException e) {
       debug("addURL", url + ": Malformed URL. " + e);
       throw new
     ServiceNotFoundException("The specified URL is malformed");
   }
     }
View Full Code Here

      * @exception IllegalStateException MLet MBean is not registered with an MBeanServer.
      */
     public Set<Object> getMBeansFromURL(URL url)
       throws ServiceNotFoundException  {
   if (url == null) {
       throw new ServiceNotFoundException("The specified URL is null");
   }
   return getMBeansFromURL(url.toString());
     }
View Full Code Here

   // Parse arguments
   if (url == null) {
       if (isTraceOn()) {
     trace(mth, "URL is null");
       }
       throw new ServiceNotFoundException("The specified URL is null");
   } else {
       url = url.replace(File.separatorChar,'/');
   }
   if (isTraceOn()) {
       trace(mth, "<URL = " + url + ">");
   }

   // Parse URL
   try {
       MLetParser parser = new MLetParser();
       mletList = parser.parseURL(url);
   } catch (Exception e) {
       final String msg =
     "Problems while parsing URL [" + url +
     "], got exception [" + e.toString() + "]";
       if (isTraceOn()) {
     trace(mth, msg);
       }
       throw EnvHelp.initCause(new ServiceNotFoundException(msg), e);
   }

   // Check that the list of MLets is not empty
   if (mletList.size() == 0) {
       final String msg =
     "File " + url + " not found or MLET tag not defined in file";
       if (isTraceOn()) {
     trace(mth, msg);
       }
       throw new ServiceNotFoundException(msg);
   }

   // Walk through the list of MLets
   Set<Object> mbeans = new HashSet<Object>();
   for (MLetContent elmt : mletList) {
View Full Code Here

     * this MBean from persistent storage
     */
    public void load()
  throws MBeanException, RuntimeOperationsException,
         InstanceNotFoundException {
  final ServiceNotFoundException x = new ServiceNotFoundException(
              "Persistence not supported for this MBean");
  throw new MBeanException(x, x.getMessage());
    }
View Full Code Here

     * persistent store
     */
    public void store()
  throws MBeanException, RuntimeOperationsException,
         InstanceNotFoundException {
  final ServiceNotFoundException x = new ServiceNotFoundException(
              "Persistence not supported for this MBean");
  throw new MBeanException(x, x.getMessage());
    }
View Full Code Here

      }
   
      final boolean updateCache = ((ctl != null) && !(ctl.equals("-1")));

             if(attrSetMethod == null  && !updateCache && attrGetMethod != null)
                throw new MBeanException(new ServiceNotFoundException("No " +
                        "setMethod field is defined in the descriptor for " +
                        attrName + " attribute and caching is not enabled " +
                        "for it"));
           
      if (updateCache || updateDescriptor) {
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

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.