Package javax.management

Examples of javax.management.MalformedObjectNameException


   public void registerProvider(ObjectName pProviderObjectName)
    throws JMException
   {
      if (pProviderObjectName == null)
      {
         throw new MalformedObjectNameException("Provider must not be null");
      }
    synchronized (mProviders) {
     if (mProviders.contains(pProviderObjectName))
      throw new JMException("Already registered: " + pProviderObjectName);
     mProviders.add(pProviderObjectName);
View Full Code Here


            buffer.append(sep).append("*");
        }
        try {
            return ObjectName.getInstance(buffer.toString());
        } catch (MalformedObjectNameException e) {
            throw (MalformedObjectNameException)new MalformedObjectNameException("Could not construct object name: " + buffer.toString()).initCause(e);
        }
    }
View Full Code Here

    if (name != null && name.length() > 0) {
      return new ObjectName(name);
    } else if (resource.objectName() != null && resource.objectName().length() > 0) {
            return new ObjectName(resource.objectName());
        } else {
            throw new MalformedObjectNameException(obj + " of class " + obj.getClass() + " has an invalid object name");
        }
    }
View Full Code Here

                }
            }
            name = new ObjectName(sb.toString());
            return (name);
        } catch (Exception e) {
            MalformedObjectNameException mone =
                new MalformedObjectNameException
                ("Cannot create object name for " + connector);
            mone.initCause(e);
            throw mone;
        }
    }
View Full Code Here

            className = className.substring(period + 1);
        if( valve instanceof Contained ) {
            container = ((Contained)valve).getContainer();
        }
        if( container == null ) {
            throw new MalformedObjectNameException(
                               "Cannot create mbean for non-contained valve " +
                               valve);
        }       
        if (container instanceof Engine) {
            String local="";
View Full Code Here

                                      ",service=" + serviceName +
                                      ",port=" + port +
                                      ",address=" + address);
                return (name);
            } catch (Exception e) {
                throw new MalformedObjectNameException
                    ("Cannot create object name for " + connector+e);
            }
        } else if ("org.apache.coyote.tomcat4.CoyoteConnector".equals
                   (connector.getClass().getName())) {
            try {
                String address = (String)
                    PropertyUtils.getSimpleProperty(connector, "address");
                Integer port = (Integer)
                    PropertyUtils.getSimpleProperty(connector, "port");
                Service service = connector.getService();
                String serviceName = null;
                if (service != null)
                    serviceName = service.getName();
                name = new ObjectName(domain + ":type=Connector" +
                                      ",service=" + serviceName +
                                      ",port=" + port +
                                      ",address=" + address);
                return (name);
            } catch (Exception e) {
                throw new MalformedObjectNameException
                    ("Cannot create object name for " + connector+e);
            }
        } else {
            throw new MalformedObjectNameException
                ("Cannot create object name for " + connector);
        }

    }
View Full Code Here

        Container container = null;
        if( valve instanceof Contained ) {
            container = ((Contained)valve).getContainer();
        }
        if( container == null ) {
            throw new MalformedObjectNameException(
                               "Cannot create mbean for non-contained valve " +
                               valve);
        }

        if (container instanceof Engine) {
View Full Code Here

    protected ObjectName createObjectName(StringBuffer buffer) throws MalformedObjectNameException {
        String text = buffer.toString();
        try {
            return new ObjectName(text);
        } catch (MalformedObjectNameException e) {
            throw new MalformedObjectNameException("Could not create ObjectName from: " + text + ". Reason: " + e);
        }
    }
View Full Code Here

                sb.append(",address=" + address);
            }
            name = new ObjectName(sb.toString());
            return (name);
        } catch (Exception e) {
            throw new MalformedObjectNameException
                ("Cannot create object name for " + connector+e);
        }
    }
View Full Code Here

            className = className.substring(period + 1);
        if( valve instanceof Contained ) {
            container = ((Contained)valve).getContainer();
        }
        if( container == null ) {
            throw new MalformedObjectNameException(
                               "Cannot create mbean for non-contained valve " +
                               valve);
        }       
        if (container instanceof Engine) {
            Service service = ((Engine)container).getService();
View Full Code Here

TOP

Related Classes of javax.management.MalformedObjectNameException

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.