Code example for MalformedObjectNameException

Methods: getMessage

0
        try { 
            return new ObjectName(this.discover.getDomain(),
                                  attributes);
        } catch (MalformedObjectNameException e) {
            //wont happen. 
            throw new IllegalArgumentException(e.getMessage());
        } 
    } 
 
    private ObjectName getJVMRuntime() {
        String jvm = getAttribute(ATTR_JVM_RUNTIME);
        if (jvm == null) {
            return null; 
        } 
        try { 
            return new ObjectName(jvm);
        } catch (MalformedObjectNameException e) {
            //wont happen. 
            throw new IllegalArgumentException(e.getMessage());
        } 
    } 
 
    private ObjectName getSSL() {
        Hashtable attributes = new Hashtable();
 
        attributes.put("Type", "SSL");
        attributes.put("Name", getName());
        attributes.put("Server", getName());
 
        try { 
            return new ObjectName(this.discover.getDomain(), 
                                  attributes);
        } catch (MalformedObjectNameException e) {
            //wont happen. 
            throw new IllegalArgumentException(e.getMessage());
        } 
    } 
 
    private void getSSLAttrs(MBeanServer mServer) {
        try { 
            //SSLListenPort attribute only exists in ServerRuntimeMBean 
            //so we have to get it for the nodes via the SSLMBean 
            Object port = mServer.getAttribute(getSSL(),
                                               ATTR_LISTEN_PORT); 
            this.attrs.put(ATTR_SSL_LISTEN_PORT, port.toString());
        } catch (Exception e) {
            //unlikely/ok 
        } 
    } 
 
    private ObjectName getLogMBean() {
        Hashtable attributes = new Hashtable();
        attributes.put("Name", getName());
        attributes.put("Location", getName());
        attributes.put("ServerConfig", getName());
        attributes.put("Type", "LogConfig");
 
        try { 
            return new ObjectName(this.discover.getDomain(), 
                                  attributes);
        } catch (MalformedObjectNameException e) {
            //wont happen. 
            throw new IllegalArgumentException(e.getMessage());
        } 
    } 
     
    public boolean getAttributes(MBeanServer mServer,
                                 ObjectName name) {