@Override public void removeAttributeChangeNotificationListener(NotificationListener listener, String attributeName) throws RuntimeOperationsException, ListenerNotFoundException { try { removeAttributeChangeNotificationListener(listener, attributeName, null); } catch (MBeanException e) { throw new RuntimeOperationsException(new RuntimeException(e.getMessage())); } }
this.mbeanName, notificationSequenceNumber.addAndGet(1), null)); } catch (MBeanException e) { logger.warn(e.getMessage(), e);
logger.error(e.getMessage(), e); } catch (RuntimeException e) { logger.error(e.getMessage(), e);
logger.warn(e.getMessage(), e);
logger.warn(e.getMessage(), e); } catch (MBeanException e) { logger.warn(e.getMessage(), e);
logger.warn(e.getMessage(), e);
logger.warn(e.getMessage(), e);
logger.warn(e.getMessage(), e);
public void removeAttributeChangeNotificationListener(NotificationListener listener, String attributeName) throws RuntimeOperationsException, ListenerNotFoundException { try { removeAttributeChangeNotificationListener(listener, attributeName, null); } catch (MBeanException e) { throw new RuntimeOperationsException(new RuntimeException(e.getMessage())); } }
public void removeAttributeChangeNotificationListener(NotificationListener listener, String attributeName) throws RuntimeOperationsException, ListenerNotFoundException { try { removeAttributeChangeNotificationListener(listener, attributeName, null); } catch (MBeanException e) { throw new RuntimeOperationsException(new RuntimeException(e.getMessage())); } }
@Override public int getThreadCount() throws MonitoringException { int result = 0; final MBeanServer mbeanServer = MBeanUtil.getMBeanServer(); try { result = (Integer) mbeanServer.getAttribute(new ObjectName(JvmMBean.JVM_MBEAN_NAME), "ThreadCount"); } catch (final MalformedObjectNameException e) { throw new MonitoringException(e.getMessage(), e); } catch (final MBeanException e) { throw new MonitoringException(e.getMessage(), e); } catch (final ReflectionException e) { throw new MonitoringException(e.getMessage(), e); } catch (final AttributeNotFoundException e) { throw new MonitoringException(e.getMessage(), e); } catch (final javax.management.InstanceNotFoundException e) { throw new MonitoringException(e.getMessage(), e); } return result; }
@Override public double getSystemLoadAverage() throws MonitoringException { double result = 0; final MBeanServer mbeanServer = MBeanUtil.getMBeanServer(); try { result = (Double) mbeanServer.getAttribute(new ObjectName(JvmMBean.JVM_MBEAN_NAME), "SystemLoadAverage"); } catch (final MalformedObjectNameException e) { throw new MonitoringException(e.getMessage(), e); } catch (final MBeanException e) { throw new MonitoringException(e.getMessage(), e); } catch (final ReflectionException e) { throw new MonitoringException(e.getMessage(), e); } catch (final AttributeNotFoundException e) { throw new MonitoringException(e.getMessage(), e); } catch (final javax.management.InstanceNotFoundException e) { throw new MonitoringException(e.getMessage(), e); } return result; }
@Override public int getAvailableProcessors() throws MonitoringException { int result; final MBeanServer mbeanServer = MBeanUtil.getMBeanServer(); try { result = (Integer) mbeanServer.getAttribute(new ObjectName(JvmMBean.JVM_MBEAN_NAME), "AvailableProcessors"); } catch (final MalformedObjectNameException e) { throw new MonitoringException(e.getMessage(), e); } catch (final MBeanException e) { throw new MonitoringException(e.getMessage(), e); } catch (final ReflectionException e) { throw new MonitoringException(e.getMessage(), e); } catch (final AttributeNotFoundException e) { throw new MonitoringException(e.getMessage(), e); } catch (final javax.management.InstanceNotFoundException e) { throw new MonitoringException(e.getMessage(), e); } return result; }
@Override public String getJvmVersion() throws MonitoringException { String result; final MBeanServer mbeanServer = MBeanUtil.getMBeanServer(); try { result = (String) mbeanServer.getAttribute(new ObjectName(JvmMBean.JVM_MBEAN_NAME), "JvmVersion"); } catch (final MalformedObjectNameException e) { throw new MonitoringException(e.getMessage(), e); } catch (final MBeanException e) { throw new MonitoringException(e.getMessage(), e); } catch (final ReflectionException e) { throw new MonitoringException(e.getMessage(), e); } catch (final AttributeNotFoundException e) { throw new MonitoringException(e.getMessage(), e); } catch (final javax.management.InstanceNotFoundException e) { throw new MonitoringException(e.getMessage(), e); } return result; }
@SuppressWarnings("unchecked") @Override public Map<String, String> getJvmSystemProperties() throws MonitoringException { final MBeanServer mbeanServer = MBeanUtil.getMBeanServer(); try { return (Map<String, String>) mbeanServer.getAttribute(new ObjectName(JvmMBean.JVM_MBEAN_NAME), "JvmSystemProperties"); } catch (final MalformedObjectNameException e) { throw new MonitoringException(e.getMessage(), e); } catch (final MBeanException e) { throw new MonitoringException(e.getMessage(), e); } catch (final ReflectionException e) { throw new MonitoringException(e.getMessage(), e); } catch (final AttributeNotFoundException e) { throw new MonitoringException(e.getMessage(), e); } catch (final javax.management.InstanceNotFoundException e) { throw new MonitoringException(e.getMessage(), e); } }
@Override public float getMemoryUsagePercentage() throws MonitoringException { float result = 0; final MBeanServer mbeanServer = MBeanUtil.getMBeanServer(); try { result = (Float) mbeanServer.getAttribute(new ObjectName(JvmMBean.JVM_MBEAN_NAME), "MemoryUsagePercentage"); } catch (final MalformedObjectNameException e) { throw new MonitoringException(e.getMessage(), e); } catch (final MBeanException e) { throw new MonitoringException(e.getMessage(), e); } catch (final ReflectionException e) { throw new MonitoringException(e.getMessage(), e); } catch (final AttributeNotFoundException e) { throw new MonitoringException(e.getMessage(), e); } catch (final javax.management.InstanceNotFoundException e) { throw new MonitoringException(e.getMessage(), e); } return result; }
@Override public String getJvmName() throws MonitoringException { String result; final MBeanServer mbeanServer = MBeanUtil.getMBeanServer(); try { result = (String) mbeanServer.getAttribute(new ObjectName(JvmMBean.JVM_MBEAN_NAME), "JvmName"); } catch (final MalformedObjectNameException e) { throw new MonitoringException(e.getMessage(), e); } catch (final MBeanException e) { throw new MonitoringException(e.getMessage(), e); } catch (final ReflectionException e) { throw new MonitoringException(e.getMessage(), e); } catch (final AttributeNotFoundException e) { throw new MonitoringException(e.getMessage(), e); } catch (final javax.management.InstanceNotFoundException e) { throw new MonitoringException(e.getMessage(), e); } return result; }
@Override public long getCurrentMemoryUsage() throws MonitoringException { long result = 0; final MBeanServer mbeanServer = MBeanUtil.getMBeanServer(); try { result = (Long) mbeanServer.getAttribute(new ObjectName(JvmMBean.JVM_MBEAN_NAME), "CurrentMemoryUsage"); } catch (final MalformedObjectNameException e) { throw new MonitoringException(e.getMessage(), e); } catch (final MBeanException e) { throw new MonitoringException(e.getMessage(), e); } catch (final ReflectionException e) { throw new MonitoringException(e.getMessage(), e); } catch (final AttributeNotFoundException e) { throw new MonitoringException(e.getMessage(), e); } catch (final javax.management.InstanceNotFoundException e) { throw new MonitoringException(e.getMessage(), e); } return result; }
@Override public long getTotalThreadsCpuTime() throws MonitoringException { long result = 0; final MBeanServer mbeanServer = MBeanUtil.getMBeanServer(); try { result = (Long) mbeanServer.getAttribute(new ObjectName(JvmMBean.JVM_MBEAN_NAME), "TotalThreadsCpuTime"); } catch (final MalformedObjectNameException e) { throw new MonitoringException(e.getMessage(), e); } catch (final MBeanException e) { throw new MonitoringException(e.getMessage(), e); } catch (final ReflectionException e) { throw new MonitoringException(e.getMessage(), e); } catch (final AttributeNotFoundException e) { throw new MonitoringException(e.getMessage(), e); } catch (final javax.management.InstanceNotFoundException e) { throw new MonitoringException(e.getMessage(), e); } return result; }
@Override public String getOSName() throws MonitoringException { String result; final MBeanServer mbeanServer = MBeanUtil.getMBeanServer(); try { result = (String) mbeanServer.getAttribute(new ObjectName(JvmMBean.JVM_MBEAN_NAME), "OSName"); } catch (final MalformedObjectNameException e) { throw new MonitoringException(e.getMessage(), e); } catch (final MBeanException e) { throw new MonitoringException(e.getMessage(), e); } catch (final ReflectionException e) { throw new MonitoringException(e.getMessage(), e); } catch (final AttributeNotFoundException e) { throw new MonitoringException(e.getMessage(), e); } catch (final javax.management.InstanceNotFoundException e) { throw new MonitoringException(e.getMessage(), e); } return result; }